JetBrains LogoIntelliJ IDEA Guide
All TipsTutorialsPlaylistsTechnologiesTopicsAbout

Get IntelliJ IDEA

Up to Writing JUnit 5 Tests
Previous
Writing JUnit 5 Tests

IntroductionSetting up Gradle for JUnit 5Creating and running a testOptional ConfigurationDisabling or Ignoring TestsHelpful Test Names for DisplayLive Templates TipMultiple AssertionsTest AssumptionsData Driven TestsChecking ExceptionsGrouping TestsShortcuts
Next

Checking Exceptions

Testing that exceptions are correctly thrown

Checking exceptions

  • Checking that [exceptions are correctly thrown] in JUnit 5 with the(https://junit.org/junit5/docs/current/user-guide/#writing-tests-assertions) assertThrows annotation
Data Driven Tests
Grouping Tests

Published

  • 2021-01-01
    by:
    Helen Scott

Tutorial Steps

  • 1

    Introduction

  • 2

    Setting up Gradle for JUnit 5

  • 3

    Creating and running a test

  • 4

    Optional Configuration

  • 5

    Disabling or Ignoring Tests

  • 6

    Helpful Test Names for Display

  • 7

    Live Templates Tip

  • 8

    Multiple Assertions

  • 9

    Test Assumptions

  • 10

    Data Driven Tests

  • 11

    Checking Exceptions

  • 12

    Grouping Tests

  • 13

    Shortcuts

Copyright © 2000–2023 JetBrains s.r.o.