private static IInputListener[] GenerateInputListeners( TextBox textBox, GameFlowFacade gameFlow, InputReactionCallbacks inputReactionCallbacks) { return(new IInputListener[] { new InputController(textBox, gameFlow, inputReactionCallbacks), textBox }); }
public void GenerateNewGame_HasFactoryMethod_FactoryMethodUsed() { var factoryMethodCalled = false; IHandlePlayerInteraction FactoryMethodMock() { factoryMethodCalled = true; return(_interactionHandlerMock.Object); } var sut = new GameFlowFacade(_boardViewUpdaterMock.Object, FactoryMethodMock); sut.GenerateNewGame(); factoryMethodCalled.Should().BeTrue(); _boardViewUpdaterMock.Verify(u => u.ResetGame()); }
public GameFlowFacadeTests() { _sut = new GameFlowFacade(_boardViewUpdaterMock.Object, () => _interactionHandlerMock.Object); }
public InputController(TextBox textBox, GameFlowFacade gameFlow, InputReactionCallbacks inputReactionCallbacks) { _textBox = textBox; _gameFlow = gameFlow; _inputReactionCallbacks = inputReactionCallbacks; }