Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Input.Tests InputCommandsTests
Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The InputCommandsTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
InputCommandsTests | Initializes a new instance of the InputCommandsTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
CountPressingAndReleasing | ||
GetInputCommands | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
ZoomOnLines |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, Timeout(5000)] public void CountPressingAndReleasing() { int pressed = 0; int released = 0; var fontText = new FontText(Font.Default, "MouseLeft pressed: " + pressed + " released: " + released, Rectangle.One); //ncrunch: no coverage start new Command( () => fontText.Text = "MouseLeft pressed: " + ++pressed + " released: " + released).Add( new MouseButtonTrigger()); new Command( () => fontText.Text = "MouseLeft pressed: " + pressed + " released: " + ++released).Add( new MouseButtonTrigger(MouseButton.Left, State.Releasing)); //ncrunch: no coverage end }
[Test, CloseAfterFirstFrame] public void GetInputCommands() { var inputCommands = ContentLoader.Load<InputCommands>("DefaultCommands"); if (inputCommands.MetaData != null) Assert.AreEqual(ContentType.InputCommand, inputCommands.MetaData.Type); }
[Test, Ignore] public void ZoomOnLines() { var line1 = new Line2D(new List<Vector2D> { new Vector2D(0.4f, 0.4f), new Vector2D(0.6f, 0.4f), new Vector2D(0.4f, 0.6f), new Vector2D(0.6f, 0.6f), new Vector2D(0.4f, 0.5f), new Vector2D(0.5f, 0.5f) }, Color.Red); new Command("Zoom", zoomAmount => ZoomLinePoints(line1.Points, zoomAmount)); }
See Also