ButtonTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    FindTheWord.Tests ButtonTests

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

public class ButtonTests : TestWithMocksOrVisually

The ButtonTests type exposes the following members.

Constructors

  NameDescription
Public methodButtonTests
Initializes a new instance of the ButtonTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodCreateButton
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Public methodShowClickableButton
Public methodShowHoverState
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test]
public void ShowHoverState()
{
    new GameButton("Wurm1", new Rectangle(0, 0, 0.5f, 0.5f));
}
[Test]
public void ShowClickableButton()
{
    var button = new GameButton("Wurm1", new Rectangle(0, 0, 0.5f, 0.5f));
    button.Clicked += () => button.Alpha = button.Alpha == 1.0f ? 0.5f : 1.0f;
}
[Test]
public void CreateButton()
{
    var button = new GameButton("Wurm1", new Rectangle(0, 0, 0.5f, 0.5f));
    Assert.IsNotNull(button);
}
See Also