Ejemplo n.º 1
0
 public void testTransport()
 {
     //create instance of factory
     Transport trans = new Transport("Wellngton Railway Station");
     //check that it is right type
     Type t = new Transport().GetType();
     Assert.IsInstanceOf(t, trans);
 }
Ejemplo n.º 2
0
        public void test_checkBankrupt()
        {
            //check bankrump we will set balance to 0 and return props to bank
            Player thePlayer = new Player("Jim");
            thePlayer.setBalance(0);
            Transport transFactory = new Transport("Wellington Railway Station");
            transFactory.setOwner(ref thePlayer);

            Board.access().addPlayer(thePlayer);
            Board.access().addProperty(transFactory);
            thePlayer.checkBankrupt();

            Assert.IsTrue(transFactory.getOwner() == Banker.access());
        }