remove UnidentifiedStopentryTest.java file that don't needs

This commit is contained in:
Abdoulbasti 2024-03-18 17:41:35 +01:00
parent a02324df62
commit fdca89a869

View file

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