Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
CreepyTowers.Tests.Creeps SandCreepStateChangerTests
Namespace: CreepyTowers.Tests.Creeps
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The SandCreepStateChangerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SandCreepStateChangerTests | Initializes a new instance of the SandCreepStateChangerTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
CheckFireEffect | ||
CheckForFireTowerEffectOnWetCreep | ||
CheckForIceTowerOnWetCreep | ||
CheckForImpactTowerEffect | ||
CheckForImpactTowerOnFrozenCreep | ||
CheckForWaterTowerEffect | ||
CheckUnfreezableCanNotBeFrozenEffect | ||
CheckWaterThenIceThenFireEffect | ||
CreateSandCreep | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, CloseAfterFirstFrame] public void CheckForImpactTowerEffect() { SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Impact, creep); Assert.IsTrue(creep.State.Slow); Assert.AreEqual(0, creep.State.SlowTimer); }
[Test, CloseAfterFirstFrame] public void CheckForWaterTowerEffect() { SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Water, creep); Assert.IsTrue(creep.State.Slow); Assert.AreEqual(0, creep.State.SlowTimer); Assert.IsTrue(creep.State.Wet); }
[Test, CloseAfterFirstFrame] public void CheckForIceTowerOnWetCreep() { creep.State.Wet = true; SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Ice, creep); Assert.IsTrue(creep.State.Frozen); Assert.IsFalse(creep.State.Wet); }
[Test, CloseAfterFirstFrame] public void CheckForImpactTowerOnFrozenCreep() { creep.State.Frozen = true; SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Impact, creep); Assert.IsTrue(creep.State.Frozen); }
[Test, CloseAfterFirstFrame] public void CheckForFireTowerEffectOnWetCreep() { creep.State.Wet = true; StateChanger.CheckCreepState(TowerType.Fire, creep); Assert.IsFalse(creep.State.Wet); }
[Test, CloseAfterFirstFrame] public void CheckWaterThenIceThenFireEffect() { SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Water, creep); Assert.IsTrue(creep.State.Wet); SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Ice, creep); Assert.IsTrue(creep.State.Frozen); SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Fire, creep); Assert.IsFalse(creep.State.Frozen); Assert.IsTrue(creep.State.Wet); }
[Test, CloseAfterFirstFrame] public void CheckFireEffect() { SandCreepStateChanger.ChangeStatesIfSandCreep(TowerType.Fire, creep); Assert.IsFalse(creep.State.Frozen); }
[Test, CloseAfterFirstFrame] public void CheckUnfreezableCanNotBeFrozenEffect() { creep.State.Unfreezable = true; StateChanger.MakeCreepFrozen(creep); Assert.IsFalse(creep.State.Frozen); }
See Also