コード例 #1
0
 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"));
 }
コード例 #2
0
 public void Initialize()
 {
     _systemControl   = new SystemModel();
     _mealControl     = _systemControl.GetMealControl();
     _categoryControl = _systemControl.GetCategoryControl();
     _categoryControl.InitializeCategoryList();
     _systemControl.InitializeMealList();
     _target = new PrivateObject(_mealControl);
 }
コード例 #3
0
        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"));
        }
コード例 #4
0
 public void InitializeMealListTest()
 {
     _model.InitializeMealList();
 }