Exemplo n.º 1
0
 /** Test of giveBall method, of class Player. Keksi miten vertaillaan booleaneita */
 @Test
 public void testGiveBall() {
   System.out.println("giveBall");
   PlayerInfo pManning = new PlayerInfo("Peyton Manning", 18);
   int[] alkupaikka1 = {5, 5};
   RouteRunner testiOff = new RouteRunner(alkupaikka1, "879987", "Q");
   Player qb = new Player(pManning, testiOff);
   qb.setLocation(alkupaikka1);
   Player instance = qb;
   instance.giveBall();
   System.out.println("Peytonilla on pallo " + instance.isBallCarrier());
 }
Exemplo n.º 2
0
 /** Test of isBallCarrier method, of class Player. */
 @Test
 public void testIsBallCarrier() {
   System.out.println("isBallCarrier");
   PlayerInfo pManning = new PlayerInfo("Peyton Manning", 18);
   int[] alkupaikka1 = {5, 5};
   RouteRunner testiOff = new RouteRunner(alkupaikka1, "879987", "Q");
   Player qb = new Player(pManning, testiOff);
   qb.setLocation(alkupaikka1);
   Player instance = qb;
   boolean expResult = false;
   boolean result = instance.isBallCarrier();
   assertEquals(expResult, result);
 }