Example #1
38
 @Test
 public void testOperationRetire() throws Exception {
   Cout cout =
       new Cout(
           5,
           Ressource.Bois,
           Ressource.Bois,
           Ressource.Pierre,
           Ressource.Pierre,
           Ressource.Pierre,
           Ressource.Papyrus,
           Ressource.Tissu);
   cout.retire(2);
   assertEquals(3, cout.getPrix().intValue());
   cout.retire(Ressource.Bois);
   assertEquals(6, cout.getListeRessources().size());
   cout.retire(Ressource.Bois, Ressource.Bois, Ressource.Papyrus, Ressource.Papyrus);
   assertEquals(4, cout.getListeRessources().size());
 }
Example #2
-107
 @Test(expected = Exception.class)
 public void testRetirePrixTropGrand() throws Exception {
   Cout cout = new Cout(5);
   cout.retire(8);
 }