public void IsEmptyMealOfCategoryTest() { Assert.AreEqual(_isDeleteCategoryEnabled, _target.GetProperty("IsDeleteCategoryEnabled")); _presentationModel.IsEmptyMealOfCategory("Cola"); Assert.AreEqual(true, _target.GetProperty("IsDeleteCategoryEnabled")); _systemModel.GetCategoryControl().InitializeCategoryList(); _systemModel.InitializeMealList(); _presentationModel.IsEmptyMealOfCategory("主餐"); Assert.AreEqual(false, _target.GetProperty("IsDeleteCategoryEnabled")); }
public void Initialize() { _systemControl = new SystemModel(); _mealControl = _systemControl.GetMealControl(); _categoryControl = _systemControl.GetCategoryControl(); _categoryControl.InitializeCategoryList(); _systemControl.InitializeMealList(); _target = new PrivateObject(_mealControl); }
public void CheckNextButtonTest() { Category category = new Category(); category.Name = "主餐"; Assert.AreEqual(_isNextButtonVisible, _target.GetProperty("IsNextButtonVisible")); _presentationModel.CheckNextButton(category.Name); Assert.AreEqual(false, _target.GetProperty("IsNextButtonVisible")); _categoryControl.InitializeCategoryList(); _systemModel.InitializeMealList(); _presentationModel.CheckNextButton(category.Name); Assert.AreEqual(true, _target.GetProperty("IsNextButtonVisible")); }
public void InitializeMealListTest() { _model.InitializeMealList(); }