From 6d96b3ba76e322b703b701f21800a72b09cbb2a7 Mon Sep 17 00:00:00 2001 From: Selim Eser <2211482@stud.hs-mannheim.de> Date: Sun, 9 Jun 2024 16:03:05 +0200 Subject: [PATCH] search method tests implemented and successfull --- .../java/de/hs_mannheim/domain/SystemTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/de/hs_mannheim/domain/SystemTest.java b/src/test/java/de/hs_mannheim/domain/SystemTest.java index 07714b8..bc8acac 100644 --- a/src/test/java/de/hs_mannheim/domain/SystemTest.java +++ b/src/test/java/de/hs_mannheim/domain/SystemTest.java @@ -3,6 +3,8 @@ package de.hs_mannheim.domain; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import java.util.ArrayList; + import org.junit.jupiter.api.Test; public class SystemTest { @@ -25,4 +27,16 @@ public class SystemTest { assertNotEquals("Es ist ein Fehler aufgetreten!",current_system.current_weather()); } + @Test + public void search(){ + + System current_system = new System("35a75437476f12302f72e55d368485db"); + + ArrayList list = current_system.search("Mannheim"); + + assertEquals("68159", list.get(0).split(";")[0]); + assertEquals("68167", list.get(4).split(";")[0]); + + } + }