diff --git a/src/TP1/Eponge.java b/src/TP1/Eponge.java new file mode 100644 index 0000000..1a2e1db --- /dev/null +++ b/src/TP1/Eponge.java @@ -0,0 +1,5 @@ +package TP1; + +public class Eponge { + +} diff --git a/tests/TP1/TestsFactorielle.java b/tests/TP1/TestsFactorielle.java new file mode 100644 index 0000000..353e4d0 --- /dev/null +++ b/tests/TP1/TestsFactorielle.java @@ -0,0 +1,32 @@ +package TP1; + +import static org.junit.Assert.assertTrue; + +import org.junit.jupiter.api.Test; + +public class TestsFactorielle { + + private String s1 = ""; + private String s2 = "a"; + private String s3 = "ab"; + private String s4 = "abba"; + private String s5 = "slttls"; + private String s6 = "radar"; + private String s7 = "applejack"; + + @Test + public void testVrais() { + assertTrue(Palindrome.pal(s1)); + assertTrue(Palindrome.pal(s2)); + assertTrue(Palindrome.pal(s4)); + assertTrue(Palindrome.pal(s5)); + assertTrue(Palindrome.pal(s6)); + } + + @Test + public void testFaux() { + assertTrue(Palindrome.pal(s3)); + assertTrue(Palindrome.pal(s7)); + } + +}