From fb60ea19f07ad7ca73bf677d052a5d8cbe6bdfef Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 12 Nov 2021 10:49:19 +0100 Subject: [PATCH 1/2] Split up index Test method --- docs/{Equivalent.md => EquivalentClass.md} | 2 +- test/TextTest.java | 30 +++++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) rename docs/{Equivalent.md => EquivalentClass.md} (97%) diff --git a/docs/Equivalent.md b/docs/EquivalentClass.md similarity index 97% rename from docs/Equivalent.md rename to docs/EquivalentClass.md index 83f7ba7..a697e56 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 376dc42..cae5683 100644 --- a/test/TextTest.java +++ b/test/TextTest.java @@ -6,9 +6,11 @@ import java.util.ArrayList; public class TextTest { Text txt; + ArrayList stringListe; @BeforeEach void setup() { + ArrayList 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()); } From bac531a67439c851a77b545828db0ebffc757b7a Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 12 Nov 2021 10:53:40 +0100 Subject: [PATCH 2/2] Split up index Test method --- test/TextTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/TextTest.java b/test/TextTest.java index fa19e6d..875d14b 100644 --- a/test/TextTest.java +++ b/test/TextTest.java @@ -11,7 +11,7 @@ public class TextTest { @BeforeEach void setup() { - ArrayList stringListe = new ArrayList<>(); + stringListe = new ArrayList<>(); txt = new Text(); }