SandCreepStateChangerTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  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

public class SandCreepStateChangerTests : TestWithMocksOrVisually

The SandCreepStateChangerTests type exposes the following members.

Constructors

  NameDescription
Public methodSandCreepStateChangerTests
Initializes a new instance of the SandCreepStateChangerTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodCheckFireEffect
Public methodCheckForFireTowerEffectOnWetCreep
Public methodCheckForIceTowerOnWetCreep
Public methodCheckForImpactTowerEffect
Public methodCheckForImpactTowerOnFrozenCreep
Public methodCheckForWaterTowerEffect
Public methodCheckUnfreezableCanNotBeFrozenEffect
Public methodCheckWaterThenIceThenFireEffect
Public methodCreateSandCreep
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
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