Skip to content

Commit

Permalink
Improve layout and grouping for IndicativeSentences example
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Mar 2, 2025
1 parent 768ea90 commit 29fdb58
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions documentation/src/docs/asciidoc/user-guide/writing-tests.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,17 @@ ones available in Jupiter:
| `IndicativeSentences` | Generates complete sentences by concatenating the names of the test and the enclosing classes.
|===

Note that for `IndicativeSentences`, you can customize the separator and the
underlying generator by using `@IndicativeSentencesGeneration` as shown in the
following example.
======
Note that for `IndicativeSentences`, you can customize the separator and the underlying
generator by using `@IndicativeSentencesGeneration` as shown in the following example.
[source,java,indent=0]
----
include::{testDir}/example/DisplayNameGeneratorDemo.java[tags=user_guide]
----
Running the above `DisplayNameGeneratorDemo` test class results in the following display names.
```
+-- DisplayNameGeneratorDemo [OK]
+-- A year is not supported [OK]
Expand All @@ -250,6 +252,7 @@ include::{testDir}/example/DisplayNameGeneratorDemo.java[tags=user_guide]
+-- Year 2020 is a leap year. [OK]
'-- Year 2048 is a leap year. [OK]
```
======


[[writing-tests-display-name-generator-default]]
Expand Down

0 comments on commit 29fdb58

Please sign in to comment.