public void TryShootBug() { Bug bug = new Bug(); PlassGun gun = new PlassGun(); gun.FireAt(bug); Assert.IsTrue(bug.IsDead()); Assert.IsTrue(gun.HasAmmo()); }
public void NUnit_FireMultipleTimes(int fireCount) { Bug bug = new Bug(); PlassGun gun = new PlassGun(); for (int i = 0; i < fireCount; i++) { gun.FireAt(bug); } if (fireCount >= 3) { Assert.IsFalse(gun.HasAmmo()); } else { Assert.IsTrue(gun.HasAmmo()); } }
public void TryShootDodgingBug() { Bug bug = new Bug(); PlassGun gun = new PlassGun(); bug.Dodge(); gun.FireAt(bug); bug.Dodge(); gun.FireAt(bug); bug.Dodge(); gun.FireAt(bug); Assert.IsFalse(bug.IsDead()); Assert.IsFalse(gun.HasAmmo()); }