Ejemplo n.º 1
0
 public void SetUp()
 {
     _boardVisualizer    = new Mock <IGameBoardVisualizer>().Object;
     _writer             = new Mock <IContentWriter>().Object;
     _inputValidatorMock = new Mock <IInputValidator>();
     _inputReaderMock    = new Mock <IInputReader>();
     _inputReaderMock.Setup(r => r.ReadInput()).Returns(USER_INPUT);
     _gameBoardMock = new Mock <IGameBoard>();
     _gameBoardMock.Setup(b => b.GetCurrentBoardState()).Returns(new BoardFields());
 }
Ejemplo n.º 2
0
 public BattleshipsGame(IGameBoardVisualizer boardVisualizer,
                        IInputReader inputReader,
                        IContentWriter writer,
                        IInputValidator validator)
 {
     _boardVisualizer = boardVisualizer;
     _inputReader     = inputReader;
     _writer          = writer;
     _validator       = validator;
 }