@@ -0,0 +1,724 @@
+package tollBarrier.vehicule;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class TestVehicule %7B%0A%0A%09Vehicule v;%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%09Set%3CMoyenDePaiment%3E mdp = new HashSet%3CMoyenDePaiment%3E();%0A%09%09mdp.add(MoyenDePaiment.CB);%0A%09%09v = new Voiture(mdp);%0A%09%7D%0A%0A%09@After%0A%09public void tearDown() throws Exception %7B%0A%09%7D%0A%0A%09@Test%0A%09public void testGetTempsPassage() %7B%0A%09%09v.rejoindreFile(new FileDAttente());%0A%09%09int millis = 2000;%0A%09%09try %7B%0A%09%09%09Thread.sleep(millis);%0A%09%09%7D catch (InterruptedException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09v.quitterPeage();%0A%09%09%0A%09%09assertTrue(v.getTempsPassage()==millis);%0A%09%7D%0A%7D%0A

Test de Vehicule