SpecialAttackSelectorTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    CreepyTowers.Tests TestWithCreepyTowersMockContentLoaderOrVisually
      CreepyTowers.Tests CreepyTowersGameForTests
        CreepyTowers.Tests.Avatars SpecialAttackSelectorTests

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

public class SpecialAttackSelectorTests : CreepyTowersGameForTests

The SpecialAttackSelectorTests type exposes the following members.

Constructors

  NameDescription
Public methodSpecialAttackSelectorTests
Initializes a new instance of the SpecialAttackSelectorTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodDispose (Inherited from CreepyTowersGameForTests.)
Public methodDragonAuraCannon
Public methodDragonBreathOfFire
Public methodInitialize (Overrides CreepyTowersGameForTests Initialize .)
Public methodInitializeCreepyTowersMockContentLoader (Inherited from TestWithCreepyTowersMockContentLoaderOrVisually.)
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Public methodPenguinBigFirework
Public methodPenguinCarpetBombing
Public methodPiggyBankCoinMinefield
Public methodPiggyBankPayDay
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Top
Fields

  NameDescription
Protected fieldgame (Inherited from CreepyTowersGameForTests.)
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test]
public void DragonBreathOfFire()
{
    var player = new Player();
    player.Avatar.ActivatedSpecialAttack = AvatarAttack.DragonBreathOfFire;
    player.Avatar.SpecialAttackAIsActivated = true;
    SpecialAttackSelector.SelectAttack(Vector2D.One);
    Assert.IsFalse(player.Avatar.SpecialAttackAIsActivated);
}
[Test]
public void DragonAuraCannon()
{
    var player = new Player();
    player.Avatar.ActivatedSpecialAttack = AvatarAttack.DragonAuraCannon;
    player.Avatar.SpecialAttackBIsActivated = true;
    SpecialAttackSelector.SelectAttack(Vector2D.One);
    Assert.IsFalse(player.Avatar.SpecialAttackBIsActivated);
}
[Test]
public void PenguinBigFirework()
{
    var player = new Player("", CreepyTowers.Content.Avatars.Penguin);
    player.Avatar.ActivatedSpecialAttack = AvatarAttack.PenguinBigFirework;
    player.Avatar.SpecialAttackAIsActivated = true;
    SpecialAttackSelector.SelectAttack(Vector2D.One);
    Assert.IsFalse(player.Avatar.SpecialAttackAIsActivated);
}
[Test, Timeout(5000)]
public void PenguinCarpetBombing()
{
    var player = new Player("", CreepyTowers.Content.Avatars.Penguin);
    player.Avatar.ActivatedSpecialAttack = AvatarAttack.PenguinCarpetBombing;
    player.Avatar.SpecialAttackBIsActivated = true;
    SpecialAttackSelector.SelectAttack(Vector2D.One);
    Assert.IsFalse(player.Avatar.SpecialAttackBIsActivated);
}
[Test]
public void PiggyBankCoinMinefield()
{
    var player = new Player("", CreepyTowers.Content.Avatars.PiggyBank);
    player.Avatar.ActivatedSpecialAttack = AvatarAttack.PiggyBankCoinMinefield;
    player.Avatar.SpecialAttackAIsActivated = true;
    SpecialAttackSelector.SelectAttack(Vector2D.One);
    Assert.IsFalse(player.Avatar.SpecialAttackAIsActivated);
}
[Test]
public void PiggyBankPayDay()
{
    var player = new Player("", CreepyTowers.Content.Avatars.PiggyBank);
    player.Avatar.ActivatedSpecialAttack = AvatarAttack.PiggyBankPayDay;
    player.Avatar.SpecialAttackBIsActivated = true;
    SpecialAttackSelector.SelectAttack(Vector2D.One);
    Assert.IsFalse(player.Avatar.SpecialAttackBIsActivated);
}
See Also