Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
Drench.Tests.Games TwoHumanNetworkGameTests
Namespace: Drench.Tests.Games
Assembly: Drench.Tests (in Drench.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TwoHumanNetworkGameTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TwoHumanNetworkGameTests | Initializes a new instance of the TwoHumanNetworkGameTests 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 (Your turn) ***", game1.upperText.Text); Assert.AreEqual("Player 2: 1 ", game1.lowerText.Text); Assert.AreEqual("*** Player 1: 1 (Waiting for other player's turn) ***", game2.upperText.Text); Assert.AreEqual("Player 2: 1 ", game2.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! ***", game1.upperText.Text); Assert.AreEqual("*** Player 1: 1 (Waiting for other player's turn) ***", game2.upperText.Text); }
[Test] public void ClickValidSquare() { ClickMouse(Vector2D.Half); Assert.AreEqual(" Player 1: 3 Game Over! Player 1 wins! ", game1.upperText.Text); }
See Also