|  | 
| 1 | 1 | import org.junit.jupiter.api.Disabled; | 
|  | 2 | +import org.junit.jupiter.api.DisplayName; | 
| 2 | 3 | import org.junit.jupiter.api.Test; | 
| 3 | 4 | 
 | 
| 4 | 5 | import static org.assertj.core.api.Assertions.assertThat; | 
| 5 | 6 | 
 | 
| 6 | 7 | public class ReverseStringTest { | 
| 7 | 8 | 
 | 
| 8 | 9 |     @Test | 
|  | 10 | +    @DisplayName("an empty string") | 
| 9 | 11 |     public void testAnEmptyString() { | 
| 10 | 12 |         assertThat(new ReverseString().reverse("")).isEqualTo(""); | 
| 11 | 13 |     } | 
| 12 | 14 | 
 | 
| 13 | 15 |     @Disabled("Remove to run test") | 
| 14 | 16 |     @Test | 
|  | 17 | +    @DisplayName("a word") | 
| 15 | 18 |     public void testAWord() { | 
| 16 | 19 |         assertThat(new ReverseString().reverse("robot")).isEqualTo("tobor"); | 
| 17 | 20 |     } | 
| 18 | 21 | 
 | 
| 19 | 22 |     @Disabled("Remove to run test") | 
| 20 | 23 |     @Test | 
|  | 24 | +    @DisplayName("a capitalized word") | 
| 21 | 25 |     public void testACapitalizedWord() { | 
| 22 | 26 |         assertThat(new ReverseString().reverse("Ramen")).isEqualTo("nemaR"); | 
| 23 | 27 |     } | 
| 24 | 28 | 
 | 
| 25 | 29 |     @Disabled("Remove to run test") | 
| 26 | 30 |     @Test | 
|  | 31 | +    @DisplayName("a sentence with punctuation") | 
| 27 | 32 |     public void testASentenceWithPunctuation() { | 
| 28 | 33 |         assertThat(new ReverseString().reverse("I'm hungry!")).isEqualTo("!yrgnuh m'I"); | 
| 29 | 34 |     } | 
| 30 | 35 | 
 | 
| 31 | 36 |     @Disabled("Remove to run test") | 
| 32 | 37 |     @Test | 
|  | 38 | +    @DisplayName("a palindrome") | 
| 33 | 39 |     public void testAPalindrome() { | 
| 34 | 40 |         assertThat(new ReverseString().reverse("racecar")).isEqualTo("racecar"); | 
| 35 | 41 |     } | 
| 36 | 42 | 
 | 
| 37 | 43 |     @Disabled("Remove to run test") | 
| 38 | 44 |     @Test | 
|  | 45 | +    @DisplayName("an even-sized word") | 
| 39 | 46 |     public void testAnEvenSizedWord() { | 
| 40 | 47 |         assertThat(new ReverseString().reverse("drawer")).isEqualTo("reward"); | 
| 41 | 48 |     } | 
|  | 
0 commit comments