Beispiel #1
0
        public void CheckAndActCondition_NoEnemies_ChangesGameStateToWon()
        {
            //Arrange
            SceneManager.CurrentScene = Scene.None;
            List <List <Map> > map   = A.Map;
            var enemiesDeadCondition = new EnemiesDeadCondition();

            //Act
            enemiesDeadCondition.CheckAndAct(map);

            //Assert
            SceneManager.CurrentScene.Should().Be(Scene.WonScene);
        }
Beispiel #2
0
        public void CheckAndActCondition_WithEnemies_GameStateDoesntChange()
        {
            //Arrange
            var expectedScene = Scene.None;

            SceneManager.CurrentScene = expectedScene;
            List <List <Map> > map   = A.Map.ContainsEntity(new Enemy());
            var enemiesDeadCondition = new EnemiesDeadCondition();

            //Act
            enemiesDeadCondition.CheckAndAct(map);

            //Assert
            SceneManager.CurrentScene.Should().Be(expectedScene);
        }