StateExtensionsTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Input.Tests StateExtensionsTests

Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class StateExtensionsTests

The StateExtensionsTests type exposes the following members.

Constructors

  NameDescription
Public methodStateExtensionsTests
Initializes a new instance of the StateExtensionsTests class
Top
Methods

  NameDescription
Public methodTestUpdateStates
Top
Examples

[Test]
public void TestUpdateStates()
{
    var state = State.Released;
    state = state.UpdateOnNativePressing(true);
    Assert.AreEqual(State.Pressing, state);
    state = state.UpdateOnNativePressing(true);
    Assert.AreEqual(State.Pressed, state);
    state = state.UpdateOnNativePressing(false);
    Assert.AreEqual(State.Releasing, state);
    state = state.UpdateOnNativePressing(false);
    Assert.AreEqual(State.Released, state);
}
See Also