Пример #1
0
        public void AfterProcessingMove_CurrentWaveIsCheckedToBeClear()
        {
            IMonsterWave mockWave = Substitute.For <IMonsterWave>();

            systemUnderTest.CurrentWave = mockWave;
            systemUnderTest.ProcessPlayerMove(Substitute.For <IGamePlayer>(), new List <IGamePiece>());

            mockWave.Received().IsCleared();
        }
Пример #2
0
        public void WhenManagerTicks_CurrentWaveTicks()
        {
            IMonsterWave mockWave = Substitute.For <IMonsterWave>();

            systemUnderTest.CurrentWave = mockWave;

            systemUnderTest.Tick(1);

            mockWave.Received().Tick(1);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }