public void AfterProcessingMove_CurrentWaveIsCheckedToBeClear() { IMonsterWave mockWave = Substitute.For <IMonsterWave>(); systemUnderTest.CurrentWave = mockWave; systemUnderTest.ProcessPlayerMove(Substitute.For <IGamePlayer>(), new List <IGamePiece>()); mockWave.Received().IsCleared(); }
public void WhenManagerTicks_CurrentWaveTicks() { IMonsterWave mockWave = Substitute.For <IMonsterWave>(); systemUnderTest.CurrentWave = mockWave; systemUnderTest.Tick(1); mockWave.Received().Tick(1); }
public void DoesMoveMatchAnyCurrentMonsters_ReturnsCurrentWaveValue() { List <IGamePiece> mockMove = new List <IGamePiece>(); IMonsterWave mockWave = Substitute.For <IMonsterWave>(); systemUnderTest.CurrentWave = mockWave; systemUnderTest.DoesMoveMatchAnyCurrentMonsters(mockMove); mockWave.Received().DoesMoveMatchAnyCurrentMonsters(mockMove); }
public void WhenProcessingPlayerMove_CurrentWaveIsProcessed() { IGamePlayer mockPlayer = Substitute.For <IGamePlayer>(); List <IGamePiece> mockMove = new List <IGamePiece>(); IMonsterWave mockWave = Substitute.For <IMonsterWave>(); systemUnderTest.CurrentWave = mockWave; systemUnderTest.ProcessPlayerMoveOnCurrentWave(mockPlayer, mockMove); mockWave.Received().ProcessPlayerMove(mockPlayer, mockMove); }
public void AfterProcessingPlayerMove_IfRemainingWave_WaveIsMadeCurrentAndPrepared() { SetCurrentWaveToBeClear(); IMonsterWave mockNextWave = Substitute.For <IMonsterWave>(); systemUnderTest.RemainingWaves = new List <IMonsterWave>() { mockNextWave }; systemUnderTest.ProcessPlayerMove(Substitute.For <IGamePlayer>(), new List <IGamePiece>()); Assert.AreEqual(mockNextWave, systemUnderTest.CurrentWave); mockNextWave.Received().Prepare(); Audio.Received().PlayOneShot(CombatAudioKeys.START_NEXT_WAVE); }