public void TestHasOwnedBy() { //Arrange Player p1 = new Player(0); Player p2 = new Player(0); RealState r = new RealState(50, 5, owner: p1); //Act //Assert Assert.IsTrue(r.OwnerIs(p1)); Assert.IsFalse(r.OwnerIs(p2)); }
public void TestDealSell() { //Arrange Player p1 = new Player(100); RealState r = new RealState(50, 5); //Act r.Deal(p1); //Assert Assert.IsTrue(r.OwnerIs(p1)); Assert.AreEqual(50, p1.Balance); }
public void TestSell() { //Arrange Player p = new Player(100); RealState r = new RealState(50, 5); //Act r.SellTo(p); //Assert Assert.IsTrue(r.HasOwner()); Assert.IsTrue(r.OwnerIs(p)); Assert.AreEqual(50, p.Balance); }
public void TestTurnSuccess() { //Arrange Player p = new Player(300); RealState r = new RealState(100, 10); Board b = new Board(new List <Player>() { p }, new List <RealState>() { r }); //Act b.Turn(p, 1); //Assert Assert.IsTrue(r.OwnerIs(p)); Assert.AreEqual(200, p.Balance); }