|
1 | 1 | import org.junit.jupiter.api.Disabled; |
2 | 2 | import org.junit.jupiter.api.Test; |
| 3 | +import org.junit.jupiter.api.DisplayName; |
3 | 4 |
|
4 | 5 | import static org.assertj.core.api.Assertions.assertThat; |
5 | 6 |
|
6 | 7 | public class AcronymTest { |
7 | 8 |
|
| 9 | + |
| 10 | + @DisplayName("basic") |
8 | 11 | @Test |
9 | 12 | public void basic() { |
10 | 13 | assertThat(new Acronym("Portable Network Graphics").get()) |
11 | 14 | .isEqualTo("PNG"); |
12 | 15 | } |
13 | 16 |
|
| 17 | + @DisplayName("lowercase words") |
14 | 18 | @Disabled("Remove to run test") |
15 | 19 | @Test |
16 | 20 | public void lowercaseWords() { |
17 | 21 | assertThat(new Acronym("Ruby on Rails").get()) |
18 | 22 | .isEqualTo("ROR"); |
19 | 23 | } |
20 | 24 |
|
| 25 | + @DisplayName("punctuation") |
21 | 26 | @Disabled("Remove to run test") |
22 | 27 | @Test |
23 | 28 | public void punctuation() { |
24 | 29 | assertThat(new Acronym("First In, First Out").get()) |
25 | 30 | .isEqualTo("FIFO"); |
26 | 31 | } |
27 | 32 |
|
| 33 | + @DisplayName("all caps word") |
28 | 34 | @Disabled("Remove to run test") |
29 | 35 | @Test |
30 | 36 | public void nonAcronymAllCapsWord() { |
31 | 37 | assertThat(new Acronym("GNU Image Manipulation Program").get()) |
32 | 38 | .isEqualTo("GIMP"); |
33 | 39 | } |
34 | 40 |
|
| 41 | + @DisplayName("punctuation without whitespace") |
35 | 42 | @Disabled("Remove to run test") |
36 | 43 | @Test |
37 | 44 | public void punctuationWithoutWhitespace() { |
38 | 45 | assertThat(new Acronym("Complementary metal-oxide semiconductor").get()) |
39 | 46 | .isEqualTo("CMOS"); |
40 | 47 | } |
41 | 48 |
|
| 49 | + @DisplayName("very long abbreviation") |
42 | 50 | @Disabled("Remove to run test") |
43 | 51 | @Test |
44 | 52 | public void veryLongAbbreviation() { |
45 | 53 | assertThat(new Acronym("Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me").get()) |
46 | 54 | .isEqualTo("ROTFLSHTMDCOALM"); |
47 | 55 | } |
48 | 56 |
|
| 57 | + @DisplayName("consecutive delimiters") |
49 | 58 | @Disabled("Remove to run test") |
50 | 59 | @Test |
51 | 60 | public void consecutiveDelimiters() { |
52 | 61 | assertThat(new Acronym("Something - I made up from thin air").get()) |
53 | 62 | .isEqualTo("SIMUFTA"); |
54 | 63 | } |
55 | 64 |
|
| 65 | + @DisplayName("apostrophes") |
56 | 66 | @Disabled("Remove to run test") |
57 | 67 | @Test |
58 | 68 | public void apostrophes() { |
59 | 69 | assertThat(new Acronym("Halley's Comet").get()) |
60 | 70 | .isEqualTo("HC"); |
61 | 71 | } |
62 | 72 |
|
| 73 | + @DisplayName("underscore emphasis") |
63 | 74 | @Disabled("Remove to run test") |
64 | 75 | @Test |
65 | 76 | public void underscoreEmphasis() { |
|
0 commit comments