package cvdatpjunit; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; /** * This class are tests for the CVDATPJUnit class * @author Florian Charlaix */ class CVDATPJUnitTest { /** * This function test the swapTwoLast static function */ @Test void swapTwoLastTest() { Assertions.assertEquals("BA", CVDATPJUnit.swapTwoLast("AB")); Assertions.assertEquals("RANI", CVDATPJUnit.swapTwoLast("RAIN")); Assertions.assertEquals("TENRANI", CVDATPJUnit.swapTwoLast("TENRAIN")); Assertions.assertEquals("A", CVDATPJUnit.swapTwoLast("A")); Assertions.assertEquals("", CVDATPJUnit.swapTwoLast("")); Assertions.assertNull(CVDATPJUnit.swapTwoLast(null)); } }