Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
GhostWars.Tests MenuTests
Namespace: GhostWars.Tests
Assembly: GhostWars.Tests (in GhostWars.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The MenuTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MenuTests | Initializes a new instance of the MenuTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
BackToMenuOnGameOver | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RestartingStartsTheSameLevelAgain | ||
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
SetGameOverAndRestartBackToCountDown | ||
ShowMenu |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, Ignore] public void ShowMenu() { Resolve<Settings>().Resolution = new Size(1200, 750); new MainMenu(Resolve<Window>()); }
[Test] public void BackToMenuOnGameOver() { GiveMenuSimulatingGameLost(); Assert.AreEqual(MainMenu.State, GameState.Menu); }
[Test] public void SetGameOverAndRestartBackToCountDown() { var menu = GiveMenuSimulatingGameLost(); menu.RestartGame(); Assert.AreEqual(MainMenu.State, GameState.CountDown); }
[Test] public void RestartingStartsTheSameLevelAgain() { var menu = GiveMenuSimulatingGameLost(2); menu.RestartGame(); Assert.AreEqual(2, menu.CurrentLevel); }
See Also