TestClass
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user