Inheritance Hierarchy
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
The RabbitTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RabbitTests | Initializes a new instance of the RabbitTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
DamageSingleRabbitToHalfHealth | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
ShowManyRabbits | ||
ShowSingleRabbit |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
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