public void TestSingleShotFiring() { var game = new GameModel(Sizes.Collection["game"], new Point(20, 100)); game.Start(0); game.Fire(); Assert.AreEqual(1, game.Blasts.Count); }
public void TestShootingLimitation() { var game = new GameModel(Sizes.Collection["game"], new Point(20, 100)); game.Start(0); game.ShotsLimit = 2; for (var i = 0; i < 3; i++) { game.Fire(); } Assert.AreEqual(2, game.Blasts.Count); }
public void TestSeveralShotsFiring() { var game = new GameModel(Sizes.Collection["game"], new Point(20, 100)); game.Start(0); game.ShotsLimit = 7; var shotsCount = new Random().Next(0, 6); for (var i = 0; i < shotsCount; i++) { game.Fire(); } Assert.AreEqual(shotsCount, game.Blasts.Count); }