public FindAllRestaurantsWithoutCusineAndEmptyMenu ( ) : List |
||
리턴 | List |
public void FindAllRestaurantsWithoutCusineAndEmptyMenu_ShouldFindRestaurantsWithEmptyMenyAndWITHOUTCuisine() { RestaurantsSearch searchUtility = new RestaurantsSearch(); //Act List<RestaurantBasicData> foundRests = searchUtility.FindAllRestaurantsWithoutCusineAndEmptyMenu(); //Asset Assert.IsNotNull(foundRests); Assert.IsFalse(foundRests.Any(r => r.Cuisines != null && r.Cuisines.Count > 0)); Assert.IsFalse(foundRests.Any(r => r.Menu != null && r.Menu.MenuParts != null && r.Menu.MenuParts.Count > 1)); }
public List<RestaurantBasicData> GetRestaurants() { try { RestaurantsSearch searchUtility = new RestaurantsSearch(); List<RestaurantBasicData> returnList = searchUtility.FindAllRestaurantsWithoutCusineAndEmptyMenu(); if (returnList != null && returnList.Count > 0) { log.InfoFormat("[GetRestaurants] Count of restaurants={0}.", returnList.Count); return returnList; } else { log.InfoFormat("[GetRestaurants] Restaurants not found."); return null; } } catch (Exception e) { log.InfoFormat("[GetRestaurants] Exception={0}.", e.Message); return null; } }