Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
CreepyTowers.Tests TestWithCreepyTowersMockContentLoaderOrVisually
CreepyTowers.Tests CreepyTowersGameForTests
CreepyTowers.Tests GameTests
Namespace: CreepyTowers.Tests
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The GameTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
GameTests | Initializes a new instance of the GameTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
Dispose | (Inherited from CreepyTowersGameForTests.) | |
ExitingGameRemovesAllEntities | ||
Initialize | (Inherited from CreepyTowersGameForTests.) | |
InitializeCreepyTowersMockContentLoader | (Inherited from TestWithCreepyTowersMockContentLoaderOrVisually.) | |
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
MessageCreditsUpdated | ||
MessageInsufficientMoney | ||
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
Fields
Name | Description | |
---|---|---|
game | (Inherited from CreepyTowersGameForTests.) |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, Ignore] public void MessageInsufficientMoney() { int amountRequired = 0; game.InsufficientCredits += i => { amountRequired = i; }; game.MessageInsufficientMoney(100); Assert.AreEqual(100, amountRequired); }
[Test] public void MessageCreditsUpdated() { int difference = 0; game.CreditsUpdated += i => { difference = i; }; game.MessageCreditsUpdated(100); Assert.AreEqual(100, difference); }
[Test] public void ExitingGameRemovesAllEntities() { MockGame.ExitGame(); Assert.AreEqual(0, EntitiesRunner.Current.GetAllEntities().Count); }
See Also