Exemplo n.º 1
0
 public void testLuck()
 {
     //create instance of factory
     LuckFactory f = new LuckFactory();
     //create instance from factory
     Luck p = f.create("Luck", true, 50);
     //check that it is right type
     Type t = new Luck().GetType();
     Assert.IsInstanceOf(t, p);
 }
Exemplo n.º 2
0
 public void LuckTests_landOn_penality()
 {
     //set luck not to draw card
     Luck luckTest = new Luck("Jim", false, 10);
     Player thePlayer = new Player("Jim");
     thePlayer.setBalance(100);
     Board.access().addPlayer(thePlayer);
     String response = luckTest.landOn(ref thePlayer);
     StringAssert.Contains("has paid", response);
 }