16 lines
529 B
Java
16 lines
529 B
Java
package cvdatpjunit;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Assertions;
|
|
|
|
class CVDATPJUnitTest {
|
|
|
|
@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(""));
|
|
}
|
|
}
|