DrenchMenuTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    Drench.Tests DrenchMenuTests

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

public class DrenchMenuTests : TestWithMocksOrVisually

The DrenchMenuTests type exposes the following members.

Constructors

  NameDescription
Public methodDrenchMenuTests
Initializes a new instance of the DrenchMenuTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodChangeGameWidth
Public methodClickHumanVsDumbAiLogic
Public methodClickHumanVsSmartAiLogic
Public methodClickSingleHumanGame
Public methodClickTwoHumanGame
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Public methodNetworkGame
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Public methodSetup
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test, CloseAfterFirstFrame, Ignore]
public void ClickSingleHumanGame()
{
    ClickMouse(new Vector2D(0.11f, 0.26f));
    Assert.AreEqual(typeof(SingleHumanGame), menu.game.GetType());
}
[Test, CloseAfterFirstFrame, Ignore]
public void ClickHumanVsDumbAiLogic()
{
    ClickMouse(new Vector2D(0.11f, 0.34f));
    Assert.AreEqual(typeof(HumanVsAiGame), menu.game.GetType());
}
[Test, CloseAfterFirstFrame, Ignore]
public void ClickHumanVsSmartAiLogic()
{
    ClickMouse(new Vector2D(0.11f, 0.43f));
    Assert.AreEqual(typeof(HumanVsAiGame), menu.game.GetType());
}
[Test, CloseAfterFirstFrame, Ignore]
public void ClickTwoHumanGame()
{
    ClickMouse(new Vector2D(0.11f, 0.51f));
    Assert.AreEqual(typeof(TwoHumanGame), menu.game.GetType());
}
[Test, CloseAfterFirstFrame, Ignore]
public void ChangeGameWidth()
{
    Assert.AreEqual("Board Size: 10 x 10", menu.boardSize.Text);
    SetMouseState(State.Pressing, new Vector2D(0.75f, 0.31f));
    SetMouseState(State.Pressed, new Vector2D(0.8f, 0.31f));
    SetMouseState(State.Released, new Vector2D(0.8f, 0.31f));
    if (!IsMockResolver)
        return;
    Assert.AreEqual("Board Size: 12 x 10", menu.boardSize.Text);
    SetMouseState(State.Pressing, new Vector2D(0.75f, 0.376f));
    SetMouseState(State.Pressed, new Vector2D(0.8f, 0.376f));
    SetMouseState(State.Released, new Vector2D(0.8f, 0.376f));
    Assert.AreEqual("Board Size: 12 x 12", menu.boardSize.Text);
}
[Test, CloseAfterFirstFrame, Ignore]
public void NetworkGame()
{
    ClickMouse(new Vector2D(0.11f, 0.6f));
    ClickMouse(new Vector2D(0.11f, 0.68f));
}
See Also