Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void Create() { var trigger = new GamePadButtonTrigger(GamePadButton.Y, State.Pressed); Assert.AreEqual(GamePadButton.Y, trigger.Button); Assert.AreEqual(State.Pressed, trigger.State); }
[Test, CloseAfterFirstFrame] public void CreateFromAttributes() { var trigger = new GamePadButtonTrigger(new Dictionary<string, string> { { "Button", "Y" }, { "State", " Pressed" } }); Assert.AreEqual(GamePadButton.Y, trigger.Button); Assert.AreEqual(State.Pressed, trigger.State); Assert.Throws<GamePadButtonTrigger.CannotCreateGamePadTriggerWithoutKey>( () => new GamePadButtonTrigger(new Dictionary<string, string>())); } }
See Also