30 lines
739 B
Java
30 lines
739 B
Java
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public class TextTest {
|
|
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());
|
|
}
|
|
}
|
|
}
|