search method tests implemented and successfull

get_destinations_methods
Selim Eser 2024-06-09 16:03:05 +02:00
parent 671553bd19
commit 6d96b3ba76
1 changed files with 14 additions and 0 deletions

View File

@ -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]);
}
} }