29 lines
666 B
Java
29 lines
666 B
Java
import org.junit.jupiter.api.Assertions;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
|
|
public class TextTest {
|
|
Text txt;
|
|
ArrayList<String> sListe;
|
|
|
|
@BeforeEach
|
|
void setup() {
|
|
txt = new Text();
|
|
}
|
|
|
|
@Test
|
|
void indexTest() {
|
|
txt.add("Hallo ?Hallo> zusammen !test!");
|
|
txt.add("Hallo, wie zusammen");
|
|
txt.add("Hallo! Wie wie zusammen");
|
|
sListe= txt.index();
|
|
for (String str : sListe){
|
|
System.out.println(str);
|
|
}
|
|
Assertions.assertEquals("Hallo 1, 2, 3",sListe.get(0));
|
|
}
|
|
}
|