public void GetAchievementsByGame() { var baseAchievement = Helpers.CreateAchievement("GetAchievementsByBaseGame"); var gameId = baseAchievement.GameId; var names = new[] { "GetAchievementsByGame1", "GetAchievementsByGame2", "GetAchievementsByGame3", "GetAchievementsByGame4", }; foreach (var name in names) { Helpers.CreateAchievement(name, gameId); } var achievements = _evaluationController.GetByGame(gameId); var matching = achievements.Where(a => names.Contains(a.Name)); Assert.Equal(names.Length, matching.Count()); }
private List <Evaluation> GetEvaluations(int gameId) { var evaluations = _evaluationController.GetByGame(gameId).ToList(); evaluations.AddRange(_evaluationController.GetByGame(Platform.GlobalGameId)); return(evaluations); }