2021-11-05 09:14:26 +01:00
|
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2021-11-04 14:19:58 +01:00
|
|
|
public class TextTest {
|
2021-11-05 09:14:26 +01:00
|
|
|
Text txt;
|
|
|
|
HashMap<String, ArrayList<Integer>> hMap;
|
|
|
|
ArrayList<String> sListe;
|
|
|
|
|
|
|
|
@BeforeEach
|
|
|
|
void setup() {
|
|
|
|
txt = new Text();
|
|
|
|
hMap = new HashMap<>();
|
|
|
|
sListe = new ArrayList<>();
|
|
|
|
sListe.add("Hallo hallo zusammen");
|
|
|
|
sListe.add("Hallo wie gehts");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void indexTest() {
|
|
|
|
hMap = txt.index(sListe);
|
|
|
|
for(Map.Entry<String,ArrayList<Integer>> entry : hMap.entrySet()) {
|
|
|
|
System.out.println("Key: " + entry.getKey() + " Value: " + entry.getValue());
|
|
|
|
}
|
|
|
|
}
|
2021-11-04 14:19:58 +01:00
|
|
|
}
|