public void testResidential() { //creates instance of factory Residential resid = new Residential("Te Papa", 150, 6, 50, 50, "cyan"); //check that it is right type Type t = new Residential().GetType(); Assert.IsInstanceOf(t, resid); }
public void checkOnlyOneHotelPerProperty() { Residential resid = new Residential(""); resid.setHotelCount(1); resid.addHotel(); Assert.AreEqual(1, resid.getHotelCount()); resid.setHotelCount(0); resid.addHotel(); Assert.AreEqual(1, resid.getHotelCount()); }
public void addMaxHouse() { Residential resid = new Residential(""); resid.setHotelCount(4); resid.addHouse(); Assert.AreEqual(4, resid.getHouseCount()); resid.setHouseCount(0); resid.addHouse(); Assert.AreEqual(4, resid.getHouseCount()); }
public void checkGetsAndSetFunctions() { Residential resid = new Residential("Te Papa", 150, 6, 50, 50, "cyan"); resid.setMortgaged(true); Assert.True(resid.getMortgaged()); Board.access().addProperty(resid); Assert.That(resid.getOwner(), Is.StringMatching("Banker")); Assert.That(resid.getName(), Is.StringMatching("Ohakune Carrot")); Assert.That(resid.getGroupColours(), Is.StringMatching("Brown")); Assert.AreEqual(100, resid.getPrice()); Assert.AreEqual(50, resid.getHouseCost()); Assert.AreEqual(50, resid.getHotelCost()); }
public void addMaxHotel() { Residential resid = new Residential(""); resid.setHotelCount(1); resid.addHotel(); }