From fdca89a869e6b5a8fb3a9dd7707ed7cf74a3b49e Mon Sep 17 00:00:00 2001 From: Abdoulbasti Date: Mon, 18 Mar 2024 17:41:35 +0100 Subject: [PATCH] remove UnidentifiedStopentryTest.java file that don't needs --- .../idfm/UnidentifiedStopentryTest.java | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/test/java/fr/u_paris/gla/project/idfm/UnidentifiedStopentryTest.java diff --git a/src/test/java/fr/u_paris/gla/project/idfm/UnidentifiedStopentryTest.java b/src/test/java/fr/u_paris/gla/project/idfm/UnidentifiedStopentryTest.java deleted file mode 100644 index 6b66300..0000000 --- a/src/test/java/fr/u_paris/gla/project/idfm/UnidentifiedStopentryTest.java +++ /dev/null @@ -1,48 +0,0 @@ -package fr.u_paris.gla.project.idfm; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - -public class UnidentifiedStopentryTest { - - - - // Teste la méthode resolve() - @Test - void testResolve() { - UnidentifiedStopEntry stop = new UnidentifiedStopEntry(2.3467, 48.8534); - StopEntry closeCandidate = new StopEntry("CloseCandidate", 2.347, 48.8535); - StopEntry farCandidate = new StopEntry("FarCandidate", 2.300, 48.850); - stop.addCandidate(closeCandidate); - stop.addCandidate(farCandidate); - - assertEquals(closeCandidate, stop.resolve(), "The closest candidate should be resolved."); - } - - // Teste l'ajout de candidats - @Test - void testAddCandidate() { - UnidentifiedStopEntry unidentifiedStop = new UnidentifiedStopEntry(2.3467, 48.8534); - StopEntry candidate = new StopEntry("Candidate", 2.347, 48.8535); - unidentifiedStop.addCandidate(candidate); - // On ne peut pas vérifier directement les candidats ajoutés à cause de la visibilité, - // mais on peut tester si resolve() renvoie le bon candidat. - assertEquals(candidate, unidentifiedStop.resolve(), "Resolve doit retourner le candidat ajouté."); - } - - - // Teste la méthode equals(Object obj) - @Test - void testEquals() { - UnidentifiedStopEntry stop1 = new UnidentifiedStopEntry(2.3467, 48.8534); - UnidentifiedStopEntry stop2 = new UnidentifiedStopEntry(2.3467, 48.8534); - StopEntry candidate = new StopEntry("Candidate", 2.300, 48.850); - stop1.addCandidate(candidate); - stop2.addCandidate(candidate); - - assertEquals(stop1, stop2, "Stops with the same candidates should be equal."); - } - -}