예제 #1
0
 @Test
 public void staticAttribTest() {
   UnilabsCar car = new UnilabsCar("GE 1111", 111, new SwissPlate());
   car.addPlein(new Plein("10-10-2012", null, 0, 0, 0));
   Calculator c = new AverageCalculator(car);
   System.out.println(c.averageConsoText());
 }
예제 #2
0
파일: CarTest.java 프로젝트: SonicFrog/UFM
 @Test
 public void multiPleinTest() {
   UnilabsCar car = new UnilabsCar(validPlate, number, new SwissPlate());
   assertTrue(
       "Le premier plein n'a pas été ajouté", car.addPlein(new Plein(date, null, 10, 10, 10)));
   assertFalse("Le plein identique a été ajouté", car.addPlein(new Plein(date, null, 10, 10, 10)));
   assertEquals("Le plein identique a été ajouté", 1, car.size());
   assertEquals("Le compte des doublons n'est pas bon", 1, car.getDuplicateCount());
 }
예제 #3
0
파일: CarTest.java 프로젝트: SonicFrog/UFM
 @Test
 public void instantiateTest() {
   UnilabsCar car = new UnilabsCar(validPlate, number, new SwissPlate());
   assertEquals(car.getPlaque(), validPlate);
   assertEquals(car.getNumeroClient(), number);
 }