public void TestThatFoodItemCollectionGetGetsFoodItemCollection() { IList <TranslationInfoSystemView> translationInfoCollection = GetTranslationInfoCollection(); Assert.That(translationInfoCollection, Is.Not.Null); Assert.That(translationInfoCollection, Is.Not.Empty); foreach (var translationInfo in translationInfoCollection) { var foodGroupTreeGetQuery = new FoodGroupTreeGetQuery { TranslationInfoIdentifier = translationInfo.TranslationInfoIdentifier }; var foodGroupTree = _foodWasteHouseholdDataService.FoodGroupTreeGet(foodGroupTreeGetQuery); Assert.That(foodGroupTree, Is.Not.Null); Assert.That(foodGroupTree.FoodGroups, Is.Not.Null); var foodGroupIdentifiers = new List <Guid?> { null }; if (foodGroupTree.FoodGroups.Any()) { foodGroupIdentifiers.Add(foodGroupTree.FoodGroups.Take(1).ElementAt(0).FoodGroupIdentifier); } foreach (var foodGroupIdentifier in foodGroupIdentifiers) { var foodItemCollectionGetQuery = new FoodItemCollectionGetQuery { TranslationInfoIdentifier = translationInfo.TranslationInfoIdentifier, FoodGroupIdentifier = foodGroupIdentifier }; var foodItemCollection = _foodWasteHouseholdDataService.FoodItemCollectionGet(foodItemCollectionGetQuery); Assert.That(foodItemCollection, Is.Not.Null); Assert.That(foodItemCollection.FoodItems, Is.Not.Null); Assert.That(foodItemCollection.FoodItems.Count(), Is.GreaterThanOrEqualTo(0)); Assert.That(foodItemCollection.DataProvider, Is.Not.Null); } } }