コード例 #1
0
        public DispatcherIntegrationTests()
        {
            _gameLogicMock    = new Mock <IGameLogic>(MockBehavior.Strict);
            _inputReaderMock  = new Mock <IInputReader>(MockBehavior.Strict);
            _outputWriterMock = new Mock <IOutputWriter>(MockBehavior.Strict);
            _soundPlayerMock  = new Mock <ISoundPlayer>(MockBehavior.Strict);
            var cursorHelper        = new CursorHelper();
            var gridPainter         = new GridPainter(_outputWriterMock.Object);
            var gridResultPainter   = new GridResultPainter(cursorHelper, _outputWriterMock.Object);
            var textResultDisplayer = new TextResultDisplayer(_outputWriterMock.Object, cursorHelper);
            var outputFacade        = new OutputFacade(cursorHelper, gridPainter, gridResultPainter, textResultDisplayer, _soundPlayerMock.Object, _outputWriterMock.Object);

            _sut = new Dispatcher(_gameLogicMock.Object, _inputReaderMock.Object, outputFacade);
        }
コード例 #2
0
 public TextResultDisplayerIntegrationTests()
 {
     _cursorHelper     = new CursorHelper();
     _outputWriterMock = new Mock <IOutputWriter>(MockBehavior.Strict);
     _sut = new TextResultDisplayer(_outputWriterMock.Object, _cursorHelper);
 }