/// <summary> /// Init all the objects /// </summary> void Start() { Input.multiTouchEnabled = false; PlayerStatistics.ResetPlayer(); m_GameCreator.CreateGame(); m_InitHUD.Init(); }
public void CreateGame_VadidSettings_GameCreatedEventInvokation() { // arrange GameCreator testGameCreator = new GameCreator(); bool wasEventCalled = false; IGame newCreatedGame = null; testGameCreator.NotifyOnGameCreated += (newGame) => { wasEventCalled = true; newCreatedGame = newGame; }; // act testGameCreator.CreateGame(_defaultSettings, _manipulatorMock.Object); // assert _manipulatorMock.Verify(m => m.ShuffleBoard(newCreatedGame.Playfield, _defaultSettings.Level), Times.Once()); Assert.IsTrue(wasEventCalled); }
public void game_creator_creates_two_bots() { var gameCreator = new GameCreator(this); gameCreator.CreateGame("bot1", "bot2"); Assert.That(_botsCreated, Is.EqualTo(2)); }