TowerPropertiesXmlTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    CreepyTowers.Tests TestWithCreepyTowersMockContentLoaderOrVisually
      CreepyTowers.Tests.Towers TowerPropertiesXmlTests

Namespace: CreepyTowers.Tests.Towers
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class TowerPropertiesXmlTests : TestWithCreepyTowersMockContentLoaderOrVisually

The TowerPropertiesXmlTests type exposes the following members.

Constructors

  NameDescription
Public methodTowerPropertiesXmlTests
Initializes a new instance of the TowerPropertiesXmlTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodInitializeCreepyTowersMockContentLoader (Inherited from TestWithCreepyTowersMockContentLoaderOrVisually.)
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.)
Public methodTestTowerPropertiesXml
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test, CloseAfterFirstFrame]
public void TestTowerPropertiesXml()
{
    var towerProperties = ContentLoader.Load<TowerPropertiesXml>(Xml.TowerProperties.ToString());
    var towerData = towerProperties.Get(TowerType.Acid);
    Assert.AreEqual(1.0f, towerData.AttackFrequency);
    Assert.AreEqual(4.0f, towerData.Range);
    Assert.AreEqual(35.0f, towerData.BasePower);
    Assert.AreEqual(230, towerData.Cost);
    Assert.AreEqual(AttackType.DirectShot, towerData.AttackType);
}
See Also