Esempio n. 1
0
        public void NextComponentActionTest()
        {
            var inputs             = new FakeInputs();
            var inputActionHandler = new TestInputActionHandler(inputs);

            inputActionHandler.Propagator.Listeners.Add(interfaceInputManager);
            interfaceInputManager.NextComponentAction = TestAction.Action1;

            Assert.IsEmpty(interfaceInputManager.FocusedComponents);

            inputs.PushKey(KeyboardKey.KEY_A);
            inputActionHandler.Update();

            inputs.ReleaseKey(KeyboardKey.KEY_A);
            inputActionHandler.Update();

            AssertContains(component1, interfaceInputManager.FocusedComponents);
        }
Esempio n. 2
0
 public void SetUp()
 {
     inputs             = new FakeInputs();
     inputActionHandler = new TestInputActionHandler(inputs);
 }