public void StartGame_WithFinishInput_ShouldEndGame() { this.mockReader = new MockIReader("finish").MockReader.Object; var engine = new GameEngine(this.gameLogic, this.mockPrinter, this.mockReader, this.db, this.topScoreController, this.gamesController); engine.StartGame(); }
public void StartGame_WithInValidCoordinates_ShouldNotPopBalloon() { this.mockReader = new MockIReader("-1 8").GetSpecialReader("-1 8"); var engine = new GameEngine(this.gameLogic, this.mockPrinter, this.mockReader, this.db, this.topScoreController, this.gamesController); var balloonsBefore = engine.GameLogic.Game.RemainingBalloons; engine.StartGame(); var balloonsAfter = engine.GameLogic.Game.RemainingBalloons; Assert.AreEqual(balloonsBefore, balloonsAfter); }
public void StartGame_WithInInvalidCommand_ShouldNotThrow() { this.mockReader = new MockIReader("invalid").GetSpecialReader("invalid"); var engine = new GameEngine(this.gameLogic, this.mockPrinter, this.mockReader, this.db, this.topScoreController, this.gamesController); engine.StartGame(); }
public void StartGame_WithSaveInput_ShouldSaveGame() { this.mockReader = new MockIReader("save").GetSpecialReader("save"); var engine = new GameEngine(this.gameLogic, this.mockPrinter, this.mockReader, this.db, this.topScoreController, this.gamesController); engine.StartGame(); Assert.IsNotNull(engine.GamesController.SearchById("save")); }