search method tests implemented and successfull
parent
671553bd19
commit
6d96b3ba76
|
@ -3,6 +3,8 @@ package de.hs_mannheim.domain;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
public class SystemTest {
|
public class SystemTest {
|
||||||
|
@ -25,4 +27,16 @@ public class SystemTest {
|
||||||
assertNotEquals("Es ist ein Fehler aufgetreten!",current_system.current_weather());
|
assertNotEquals("Es ist ein Fehler aufgetreten!",current_system.current_weather());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void search(){
|
||||||
|
|
||||||
|
System current_system = new System("35a75437476f12302f72e55d368485db");
|
||||||
|
|
||||||
|
ArrayList<String> list = current_system.search("Mannheim");
|
||||||
|
|
||||||
|
assertEquals("68159", list.get(0).split(";")[0]);
|
||||||
|
assertEquals("68167", list.get(4).split(";")[0]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue