public void VerifyInitialization() { var beeType = new BeeType { Name = "Test bee", DamagePerHit = 5, MaxHitPoints = 10, InitialNumberOfBees = 1 }; var bee = new Bee(beeType); Assert.AreEqual(10, bee.HitPoints); Assert.AreSame(beeType, bee.BeeType); }
public void VerifyBeeDeadWhenKillCalled() { var bee = new Bee(new BeeType { Name = "A Bee", DamagePerHit = 7, MaxHitPoints = 50, InitialNumberOfBees = 1 }); bee.Kill(); Assert.IsTrue(bee.IsDead); Assert.IsTrue(bee.HitPoints==0); }
private ActionResult GameView(BeeGame game, Bee bee) { StoreGame(game); var model = new BeeGameModel { BeeGame = game, HitBee = bee, }; return View("GameView", model); }
public void VerifyIsDeadReturnsTrueWhenDead() { var bee = new Bee(new BeeType { Name = "Dead in one hit bee", DamagePerHit = 7, MaxHitPoints = 5, InitialNumberOfBees = 1 }); var result = bee.Hit(); Assert.IsTrue(bee.IsDead); }
public void VerifyHitPointsAreReducedOnHit() { var bee = new Bee(new BeeType { Name = "Test bee", DamagePerHit = 5, MaxHitPoints = 10, InitialNumberOfBees = 1 }); bee.Hit(); Assert.AreEqual(5, bee.HitPoints); }