示例#1
0
 /** Test of cataclisme method, of class Personnage. */
 @Ignore
 @Test
 public void testCataclisme() {
   System.out.println("cataclisme");
   Personnage instance = null;
   instance.cataclisme();
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
示例#2
0
 /** Test of attaque method, of class Personnage. */
 @Ignore
 @Test
 public void testAttaque() {
   System.out.println("attaque");
   Victime v = null;
   Personnage instance = null;
   instance.attaque(v);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
示例#3
0
 /** Test of subitFrappe method, of class Personnage. */
 @Ignore
 @Test
 public void testSubitFrappe() {
   System.out.println("subitFrappe");
   int coup = 0;
   Personnage instance = null;
   int expResult = 0;
   int result = instance.subitFrappe(coup);
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
示例#4
0
 /** Test of toString method, of class Personnage. */
 @Test
 public void testToString() {
   System.out.println("toString");
   String expResult = "salim 15";
   String result = s1.toString();
   assertEquals(expResult, result);
 }
示例#5
0
 /** Test of detruit method, of class Personnage. */
 @Test
 public void testDetruit() {
   System.out.println("detruit");
   boolean expResult = false;
   boolean result = s1.detruit();
   assertEquals(expResult, result);
 }
示例#6
0
 /** Test of getVie method, of class Personnage. */
 @Test
 public void testGetVie() {
   System.out.println("getVie");
   int expResult = 15;
   int result = s1.getVie();
   assertEquals(expResult, result);
 }
示例#7
0
 /** Test of getNom method, of class Personnage. */
 @Test
 public void testGetNom() {
   System.out.println("getNom");
   String expResult = "salim";
   String result = s1.getNom();
   assertEquals(expResult, result);
 }
示例#8
0
 /** Test of addVie method, of class Personnage. */
 @Test
 public void testAddVie() {
   System.out.println("addVie");
   s1.addVie(-1);
   assertTrue(s1.getVie() == 14);
   s1.addVie(-s1.getVie());
   assertTrue(s1.detruit());
   s1.addVie(1); // un mort n'a pas le droit de gagner ni de perdre de pdv
   assertTrue(s1.detruit());
   s1.addVie(-(int) (1.0 / 0.0));
   assertTrue(s1.detruit());
 }