Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
CreepyTowers.Tests TestWithCreepyTowersMockContentLoaderOrVisually
CreepyTowers.Tests CreepyTowersGameForTests
CreepyTowers.Tests.Creeps CreepStateTests
Namespace: CreepyTowers.Tests.Creeps
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The CreepStateTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | CreepStateTests | Initializes a new instance of the CreepStateTests class |
Methods
Name | Description | |
---|---|---|
![]() | AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) |
![]() | Dispose | (Inherited from CreepyTowersGameForTests.) |
![]() | Initialize | (Inherited from CreepyTowersGameForTests.) |
![]() | InitializeCreepyTowersMockContentLoader | (Inherited from TestWithCreepyTowersMockContentLoaderOrVisually.) |
![]() | InitializeResolver | (Inherited from TestWithMocksOrVisually.) |
![]() | RegisterMock T | (Inherited from TestWithMocksOrVisually.) |
![]() | Resolve T | (Inherited from TestWithMocksOrVisually.) |
![]() | RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) |
![]() | RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
![]() | TestCreepState | |
![]() | TestFrozenState | |
![]() | TestMeltState | |
![]() | TestSlowImmuneState |
Fields
Name | Description | |
---|---|---|
![]() | game | (Inherited from CreepyTowersGameForTests.) |
Properties
Name | Description | |
---|---|---|
![]() | IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test] public void TestCreepState() { var state = new CreepState(); state.SetVulnerabilityWithValue(TowerType.Ice, 1000f); Assert.AreEqual(Vulnerability.Sudden, state.GetVulnerability(TowerType.Ice)); }
[Test] public void TestFrozenState() { var creep = new Creep(CreepType.Cloth, Vector2D.Zero); var state = new CreepState(); state.Frozen = true; state.UpdateStateAndTimers(creep); Assert.IsTrue(state.Frozen); state.Unfreezable = true; state.UpdateStateAndTimers(creep); Assert.IsTrue(state.Unfreezable); }
[Test] public void TestMeltState() { var creep = new Creep(CreepType.Cloth, Vector2D.Zero); var state = new CreepState(); state.Melt = true; state.UpdateStateAndTimers(creep); Assert.IsTrue(state.Melt); }
[Test] public void TestSlowImmuneState() { var creep = new Creep(CreepType.Cloth, Vector2D.Zero); var state = new CreepState(); state.Slow = true; state.UpdateStateAndTimers(creep); Assert.IsTrue(state.Slow); state.SlowImmune = true; state.UpdateStateAndTimers(creep); Assert.IsTrue(state.SlowImmune); }
See Also