anchor.diff:  [[writing-tests]]
   == Writing Tests
  +
  +The following example provides a glimpse at the minimum requirements for writing a test in
  +JUnit Jupiter. Subsequent sections of this chapter will provide further details on all
  +available features.
   
   [source,java,indent=0]
   .A first test case
  
positive.code: [[writing-tests-classes-and-methods]]
  === Test Classes and Methods
  
  A _test method_ is any instance method that is directly annotated or meta-annotated with
  `@Test`, `@RepeatedTest`, `@ParameterizedTest`, `@TestFactory`, or `@TestTemplate`. A
  _test class_ is any top-level or `static` member class that contains at least one _test
  method_.
  
  [source,java,indent=0]
  .A standard test class
  ----
  include::{testDir}/example/StandardTests.java[tags=user_guide]
  ----
  
  NOTE: Test classes and test methods are not required to be `public`, but they must _not_
  be `private`.
  
  [[writing-tests-display-names]]
  === Display Names
  
negative.code: | `@TempDir`               | Used to supply a <<writing-tests-built-in-extensions-TempDirectory,temporary directory>> via field injection or parameter injection in a lifecycle method or test method; located in the `org.junit.jupiter.api.io` package.
  |===
  
  WARNING: Some annotations may currently be _experimental_. Consult the table in
  <<api-evolution-experimental-apis>> for details.
  
  