InteractionTests ClassDelta Engine Documentation
Inheritance Hierarchy

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

public class InteractionTests : CreepyTowersGameForTests

The InteractionTests type exposes the following members.

Constructors

  NameDescription
Public methodInteractionTests
Initializes a new instance of the InteractionTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodConstructor
Public methodDispose (Inherited from CreepyTowersGameForTests.)
Public methodInitialize (Inherited from CreepyTowersGameForTests.)
Public methodInitializeCreepyTowersMockContentLoader (Inherited from TestWithCreepyTowersMockContentLoaderOrVisually.)
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Public methodPerformAdjustment
Public methodPerformBuff
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Public methodSetUp
Top
Fields

  NameDescription
Protected fieldgame (Inherited from CreepyTowersGameForTests.)
Top
Properties

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