public void SetUp() { mealFactory = new BreakfastRuleFactory(); map = MealMapFactory.Create(Constants.Morning); output = new List<string>(); dishes = new List<int>(); }
public void TearDown() { mealFactory = null; output = null; dishes = null; rule = null; }
public void SetUp() { mealFactory = new DinnerRuleFactory(); map = MealMapFactory.Create("night"); output = new List<string>(); dishes = new List<int>(); }
public FoodController(IFoodFactory foodFactory, IMealFactory mealFactory, IFoodRepository repository, IMealRepository mealRepository) { this.repository = repository; this.mealRepository = mealRepository; this.foodFactory = foodFactory; this.mealFactory = mealFactory; }
public MealFactory(MealRequirements requirements) { if (!requirements.IsHuman) { _factory = (IMealFactory) new Ogre(); } else { switch (requirements.mealTime) { case 0: _factory = (IMealFactory) new Breakfast(); break; case 1: _factory = (IMealFactory) new Lunch(); break; case 2: _factory = (IMealFactory) new DinDin(); break; default: _factory = (IMealFactory) new Breakfast(); break; } } _requirements = requirements; }
public MealTest() { _mealFactory = new MealFactory(); }
public MealController(IMealFactory factory, IMealRepository repository) { this.mealFactory = factory; this.repository = repository; }