RabbitTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    GameOfDeath.Tests RabbitTests

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

public class RabbitTests : TestWithMocksOrVisually

The RabbitTests type exposes the following members.

Constructors

  NameDescription
Public methodRabbitTests
Initializes a new instance of the RabbitTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodDamageSingleRabbitToHalfHealth
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 methodShowManyRabbits
Public methodShowSingleRabbit
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test]
public void ShowSingleRabbit()
{
        CreateRabbitWith50Health(Vector2D.Half);
}
[Test]
public void DamageSingleRabbitToHalfHealth()
{
        var rabbit = CreateRabbitWith50Health(Vector2D.Half);
        rabbit.DoDamage(25);
}
[Test]
public void ShowManyRabbits()
{
    var viewport = Resolve<ScreenSpace>().Viewport;
    var size = new Size(0.1f);
    for (float x = viewport.Left + size.Width / 2; x <= viewport.Right; x += size.Width)
        for (float y = viewport.Top + size.Height / 2; y <= viewport.Bottom; y += size.Height)
            CreateRabbitWith50Health(new Vector2D(x, y));
}
See Also