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."); - } - -}