diff --git a/docs/Equivalent.md b/docs/EquivalentClass.md similarity index 97% rename from docs/Equivalent.md rename to docs/EquivalentClass.md index 0843df2..be8eca8 100644 --- a/docs/Equivalent.md +++ b/docs/EquivalentClass.md @@ -1,4 +1,4 @@ -# Equivalent +# Equivalentclass ### Text.java Index method diff --git a/test/TextTest.java b/test/TextTest.java index fa6eb80..875d14b 100644 --- a/test/TextTest.java +++ b/test/TextTest.java @@ -7,9 +7,11 @@ import java.util.ArrayList; public class TextTest { Text txt; + ArrayList stringListe; @BeforeEach void setup() { + stringListe = new ArrayList<>(); txt = new Text(); } @@ -67,31 +69,35 @@ public class TextTest { /** * Test methode for Index method + * For TestCase Positiv Testcase One, Three and Four Negativ Testcase Two */ @Test - void indexTest() { - ArrayList stringListe; - - //Positiv Testcase One, Three and Four Negativ Testcase Two + void indexTestOne() { txt.add("Word word Test"); txt.add("Word word etc. !!test zweite... Zeile"); txt.add("Lorem ipsum lorem ipsum TEST"); stringListe = txt.index(); Assertions.assertEquals("Word 1, 2", stringListe.get(0)); Assertions.assertEquals("Test 1, 2, 3", stringListe.get(1)); - //End of Test + } - setup(); - - //Positiv Testcase Two + /** + * Test methode for Index method + * For TestCase Positiv Testcase Two + */ + @Test + void indexTestTwo() { txt.add("Word word Word Test"); stringListe = txt.index(); Assertions.assertEquals("Word 1", stringListe.get(0)); - //End of Test + } - setup(); - - //Negativ Testcase One + /** + * Test methode for Index method + * For TestCase Negativ Testcase One + */ + @Test + void indexTestThree() { stringListe = txt.index(); Assertions.assertEquals(0, stringListe.size()); }