Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
Drench.Tests.Games HumanVsAiGameTests
Namespace: Drench.Tests.Games
Assembly: Drench.Tests (in Drench.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The HumanVsAiGameTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
HumanVsAiGameTests | Initializes a new instance of the HumanVsAiGameTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
ClickInvalidSquare | ||
ClickValidSquare | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
NewGameInstructions | ||
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
SetUp |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test] public void NewGameInstructions() { Assert.AreEqual("*** Player 1: 1 ***", game.upperText.Text); Assert.AreEqual("Player 2: 1 ", game.lowerText.Text); }
[Test] public void ClickInvalidSquare() { var firstSquare = new Vector2D(ScreenSpace.Current.Left + Game.Border + 0.01f, ScreenSpace.Current.Top + Game.Border + 0.01f); ClickMouse(firstSquare); Assert.AreEqual("*** Player 1: 1 - Invalid Move! ***", game.upperText.Text); }
[Test] public void ClickValidSquare() { ClickMouse(Vector2D.Half); Assert.AreEqual("*** Player 1: 3 Game Over! Player 1 wins! ***", game.upperText.Text); }
See Also