Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
a7c1e411d0
|
@ -1,4 +1,4 @@
|
||||||
# Equivalent
|
# Equivalentclass
|
||||||
|
|
||||||
### Text.java Index method
|
### Text.java Index method
|
||||||
|
|
|
@ -7,9 +7,11 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
public class TextTest {
|
public class TextTest {
|
||||||
Text txt;
|
Text txt;
|
||||||
|
ArrayList<String> stringListe;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setup() {
|
void setup() {
|
||||||
|
stringListe = new ArrayList<>();
|
||||||
txt = new Text();
|
txt = new Text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,31 +69,35 @@ public class TextTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test methode for Index method
|
* Test methode for Index method
|
||||||
|
* For TestCase Positiv Testcase One, Three and Four Negativ Testcase Two
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
void indexTest() {
|
void indexTestOne() {
|
||||||
ArrayList<String> stringListe;
|
|
||||||
|
|
||||||
//Positiv Testcase One, Three and Four Negativ Testcase Two
|
|
||||||
txt.add("Word word Test");
|
txt.add("Word word Test");
|
||||||
txt.add("Word word etc. !!test zweite... Zeile");
|
txt.add("Word word etc. !!test zweite... Zeile");
|
||||||
txt.add("Lorem ipsum lorem ipsum TEST");
|
txt.add("Lorem ipsum lorem ipsum TEST");
|
||||||
stringListe = txt.index();
|
stringListe = txt.index();
|
||||||
Assertions.assertEquals("Word 1, 2", stringListe.get(0));
|
Assertions.assertEquals("Word 1, 2", stringListe.get(0));
|
||||||
Assertions.assertEquals("Test 1, 2, 3", stringListe.get(1));
|
Assertions.assertEquals("Test 1, 2, 3", stringListe.get(1));
|
||||||
//End of Test
|
}
|
||||||
|
|
||||||
setup();
|
/**
|
||||||
|
* Test methode for Index method
|
||||||
//Positiv Testcase Two
|
* For TestCase Positiv Testcase Two
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void indexTestTwo() {
|
||||||
txt.add("Word word Word Test");
|
txt.add("Word word Word Test");
|
||||||
stringListe = txt.index();
|
stringListe = txt.index();
|
||||||
Assertions.assertEquals("Word 1", stringListe.get(0));
|
Assertions.assertEquals("Word 1", stringListe.get(0));
|
||||||
//End of Test
|
}
|
||||||
|
|
||||||
setup();
|
/**
|
||||||
|
* Test methode for Index method
|
||||||
//Negativ Testcase One
|
* For TestCase Negativ Testcase One
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void indexTestThree() {
|
||||||
stringListe = txt.index();
|
stringListe = txt.index();
|
||||||
Assertions.assertEquals(0, stringListe.size());
|
Assertions.assertEquals(0, stringListe.size());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue