예제 #1
0
        public void Button_WrongBinding_Unhandled()
        {
            var inputHandler = new TestInputHandler();

            inputHandler.AddButtonResponse
            (
                EInputKey.Interact, pressed => EInputHandlerResult.Handled
            );

            Assert.AreEqual(inputHandler.HandleButtonInput(EInputKey.HorizontalAnalog, false), EInputHandlerResult.Unhandled);
            inputHandler.ClearResponses();
        }
예제 #2
0
        public void Button_BindingDoesNotHandle_Unhandled()
        {
            var             inputHandler     = new TestInputHandler();
            const EInputKey expectedInputKey = EInputKey.Interact;

            inputHandler.AddButtonResponse
            (
                expectedInputKey, pressed => EInputHandlerResult.Unhandled
            );

            Assert.AreEqual(inputHandler.HandleButtonInput(expectedInputKey, false), EInputHandlerResult.Unhandled);
            inputHandler.ClearResponses();
        }
예제 #3
0
        public void Button_NoBinding_Unhandled()
        {
            var inputHandler = new TestInputHandler();

            Assert.AreEqual(inputHandler.HandleButtonInput(EInputKey.HorizontalAnalog, false), EInputHandlerResult.Unhandled);
        }