From e852afc59a9a35bb3b2cf0f89472e8c64138512b Mon Sep 17 00:00:00 2001 From: JunkJumper Date: Wed, 2 Sep 2020 14:49:33 +0200 Subject: [PATCH] exo 2 ok --- src/TP1/Eponge.java | 5 +++++ tests/TP1/TestsFactorielle.java | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/TP1/Eponge.java create mode 100644 tests/TP1/TestsFactorielle.java 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)); + } + +}