Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
CreepyTowers.Tests.Creeps IronCreepStateChangerTests
Namespace: CreepyTowers.Tests.Creeps
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The IronCreepStateChangerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | IronCreepStateChangerTests | Initializes a new instance of the IronCreepStateChangerTests class |
Methods
Name | Description | |
---|---|---|
![]() | AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) |
![]() | ApplyAcidThenWater | |
![]() | ApplyingIceToMeltedIronCreepMightNotShatter | |
![]() | ApplyingIceToMeltedIronCreepMightShatter | |
![]() | CheckForAcidTowerEffect | |
![]() | CheckForFireTowerEffect | |
![]() | CheckForWaterTowerEffect | |
![]() | CreateClothCreep | |
![]() | 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 CheckForFireTowerEffect() { IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Fire, creep); Assert.IsTrue(creep.State.Melt); Assert.AreEqual(Vulnerability.Normal, creep.State.VulnerabilityState[(int)TowerType.Slice]); Assert.AreEqual(Vulnerability.Weak, creep.State.VulnerabilityState[(int)TowerType.Impact]); }
[Test, CloseAfterFirstFrame] public void CheckForAcidTowerEffect() { IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep); Assert.IsTrue(creep.State.Melt); }
[Test, CloseAfterFirstFrame] public void CheckForWaterTowerEffect() { StateChanger.CheckCreepState(TowerType.Water, creep); Assert.IsTrue(creep.State.Rust); }
[Test, CloseAfterFirstFrame] public void ApplyAcidThenWater() { IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Water, creep); Assert.AreEqual(Vulnerability.Vulnerable, creep.State.VulnerabilityState[(int)TowerType.Water]); Assert.AreEqual(Vulnerability.HardBoiled, creep.State.VulnerabilityState[(int)TowerType.Slice]); Assert.AreEqual(Vulnerability.Resistant, creep.State.VulnerabilityState[(int)TowerType.Impact]); }
[Test, CloseAfterFirstFrame] public void ApplyingIceToMeltedIronCreepMightShatter() { Randomizer.Use(new FixedRandom(new[] { 0.0f })); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Ice, creep); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Ice, creep); Assert.AreEqual(0, creep.GetStatValue("Hp")); }
[Test, CloseAfterFirstFrame] public void ApplyingIceToMeltedIronCreepMightNotShatter() { Randomizer.Use(new FixedRandom(new[] { 0.9f })); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Ice, creep); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Acid, creep); IronCreepStateChanger.ChangeStatesIfIronCreep(TowerType.Ice, creep); Assert.AreEqual(1, creep.GetStatPercentage("Hp")); }
See Also