import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; /** * The test class PalindromesTest. * * @author (your name) * @version (a version number or a date) */ public class PalindromesTest { /** * Default constructor for test class PalindromesTest */ public PalindromesTest() { } /** * Sets up the test fixture. * * Called before every test case method. */ @BeforeEach public void setUp() { } /** * Tears down the test fixture. * * Called after every test case method. */ @AfterEach public void tearDown() { } @Test public void shortPalindromeTest() { Palindromes p = new Palindromes(); assertEquals(true, p.isPalindrome("a")); } @Test public void shortNonPalindromeTest() { Palindromes p = new Palindromes(); assertEquals(false, p.isPalindrome("java")); } @Test public void shortEvenPalindromeTest() { Palindromes p = new Palindromes(); assertEquals(true, p.isPalindrome("aa")); } @Test public void shortOddPalindromeTest() { Palindromes p = new Palindromes(); assertEquals(true, p.isPalindrome("wow")); } }