public GetDishModel ( |
||
dishData | ||
restId | string | |
baseLine | bool | |
lang | string | |
Résultat |
public void GetDishModelTest_ShouldReturnDishModelIfCalledFromRestaurantModel() { RestaurantModel rest = new RestaurantModel(); Dish dish = new Dish() { Name = "TempDish", Description = "description", Id = 1, NutritionFacts = new NutritionFacts(), BaseLineNutritionFacts = new NutritionFacts() }; dish.NutritionFacts.TotalCarbohydrate = 20; dish.BaseLineNutritionFacts.TotalCarbohydrate = 33; DishModel dishModel = rest.GetDishModel(dish, "111", false, "he"); var type = dishModel.GetType(); Assert.IsFalse(type == typeof(DishModelBackOffice)); Assert.IsTrue(type == typeof(DishModel)); }