Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
SideScroller.Tests GameTests
Namespace: SideScroller.Tests
Assembly: SideScroller.Tests (in SideScroller.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The GameTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | GameTests | Initializes a new instance of the GameTests class |
Methods
Name | Description | |
---|---|---|
![]() | AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) |
![]() | CreateEnemiesAFterPointInTime | |
![]() | CreateNewGame | |
![]() | ExitGame | |
![]() | InitializeResolver | (Inherited from TestWithMocksOrVisually.) |
![]() | RegisterMock T | (Inherited from TestWithMocksOrVisually.) |
![]() | Resolve T | (Inherited from TestWithMocksOrVisually.) |
![]() | RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) |
![]() | RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
![]() | StartTheGame |
Properties
Name | Description | |
---|---|---|
![]() | IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test] public void StartTheGame() { var startButton = (InteractiveButton)game.mainMenu.Controls[IndexOfStartButton]; startButton.Clicked.Invoke(); Assert.IsNotNull(game.player); }
[Test] public void ExitGame() { var exitButton = (InteractiveButton)game.mainMenu.Controls[IndexOfExitButton]; exitButton.Clicked.Invoke(); }
[Test] public void CreateEnemiesAFterPointInTime() { game.StartGame(); AdvanceTimeAndUpdateEntities(TimeToSpawnNewEnemy + 0.1f); Assert.AreEqual(1, EntitiesRunner.Current.GetEntitiesOfType<EnemyPlane>().Count); }
See Also