TestClass

This commit is contained in:
Andrin Fassbind
2021-11-05 09:14:26 +01:00
parent 9c0010f11f
commit cd1da5de4a
3 changed files with 43 additions and 10 deletions
+27
View File
@@ -1,2 +1,29 @@
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());
}
}
}