Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
CreepyTowers.Tests TestWithCreepyTowersMockContentLoaderOrVisually
CreepyTowers.Tests CreepyTowersGameForTests
CreepyTowers.Tests.Stats InteractionTests
Namespace: CreepyTowers.Tests.Stats
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The InteractionTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | InteractionTests | Initializes a new instance of the InteractionTests class |
Methods
Name | Description | |
---|---|---|
![]() | AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) |
![]() | Constructor | |
![]() | Dispose | (Inherited from CreepyTowersGameForTests.) |
![]() | Initialize | (Inherited from CreepyTowersGameForTests.) |
![]() | InitializeCreepyTowersMockContentLoader | (Inherited from TestWithCreepyTowersMockContentLoaderOrVisually.) |
![]() | InitializeResolver | (Inherited from TestWithMocksOrVisually.) |
![]() | PerformAdjustment | |
![]() | PerformBuff | |
![]() | RegisterMock T | (Inherited from TestWithMocksOrVisually.) |
![]() | Resolve T | (Inherited from TestWithMocksOrVisually.) |
![]() | RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) |
![]() | RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
![]() | SetUp |
Fields
Name | Description | |
---|---|---|
![]() | game | (Inherited from CreepyTowersGameForTests.) |
Properties
Name | Description | |
---|---|---|
![]() | IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test] public void Constructor() { var effect = new BuffEffect("TestHpBuff"); var interaction = new Interaction(tower, creep, adjustment, effect); Assert.AreEqual(tower, interaction.Source); Assert.AreEqual(creep, interaction.Target); }
[Test] public void PerformAdjustment() { var interaction = new Interaction(tower, creep, adjustment); interaction.Apply(); Assert.AreEqual(0.0f, creep.GetStatValue("Hp")); }
[Test] public void PerformBuff() { var effect = new BuffEffect("TestHpBuff"); var interaction = new Interaction(tower, creep, adjustment, effect); interaction.Apply(); Assert.AreEqual(204.0f, creep.GetStatValue("Hp")); }
See Also