public void Can_Shoot_Target() { //arrange var enemy = new GroundEnemy(1.3F, 100, 100, null) { Center = new PointF(0, 0), HitPoints = 50 }; var bullet = new SimpleBullet(new PointF(0, 0), new PointF(0, 0)) { Damage = 50 }; //act bullet.Move(new List<BaseEnemy>() { enemy }); //assert Assert.IsTrue(enemy.Shooted, "Bullet failed to shoot the target."); }
public void Can_Deal_Damage_To_Target() { //arrange var enemy = new GroundEnemy(1.3F, 100, 100, null) { Center = new PointF(0, 0), HitPoints = 100 }; var bullet = new SimpleBullet(new PointF(0, 0), new PointF(0, 0)) { Damage = 50 }; //act bullet.Move(new List<BaseEnemy>() { enemy }); //assert Assert.AreEqual(50, enemy.HitPoints, "Bullet failed to damage the target for exact damage amount."); }