public void When_user_does_not_select_a_preworkLevel_filter_then_all_preworkLevel_ids_get_passed_to_sql_query() { // Arrange (Given, Context) // Given these parameters: List <int> preworkLevelFilterValuesSelected = new List <int>(); List <int> currentPreworkLevels = new List <int>() { 1, 2, 3, 4 }; // and this expected result: List <int> expectedResult = currentPreworkLevels; // and using methods from this repository: var gameWithMetadataRepo = new GameWithMetadataRepository(); var solution = gameWithMetadataRepo.EnsureValidFilterValuesPreworkLevel(preworkLevelFilterValuesSelected); // Assert (Then) Assert.Equal(expectedResult, solution); }
public void When_user_does_not_select_an_age_filter_then_all_age_ids_get_passed_to_sql_query() { // Arrange (Given, Context) // Given these parameters: List <int> ageFilterValuesSelected = new List <int>(); List <int> currentAges = new List <int>() { 1, 2, 3, 4, 5 }; // and this expected result: List <int> expectedResult = currentAges; // and using methods from this repository: var gameWithMetadataRepo = new GameWithMetadataRepository(); // if I am passing an empty list to this method, then it should return the full list: var solution = gameWithMetadataRepo.EnsureValidFilterValuesAge(ageFilterValuesSelected); // Assert (Then) Assert.Equal(expectedResult, solution); }
public GamesController(GameRepository repo1, GameWithMetadataRepository repo2, UserRepository userRepo) { _gameRepo = repo1; _gameWithDataRepo = repo2; _userRepo = userRepo; }