コード例 #1
0
        public void DeleteCategoryListCategoryTest()
        {
            List <Category>      categories = new List <Category>();
            PosCustomerSideModel testModel  = new PosCustomerSideModel();
            bool isDeleteCategoryInList     = false;

            categories = testModel.GetCategoryList();
            categories.RemoveAt(2);
            _model.DeleteCategoryListCategory(2);
            for (int i = 0; i < categories.Count; i++)
            {
                Assert.AreEqual(categories[i].Name, _model.GetCategoryList()[i].Name);
            }
            foreach (Meal meal in _model.GetMealList())
            {
                if (meal.Category == "飲料")
                {
                    isDeleteCategoryInList = true;
                }
            }
            Assert.IsFalse(isDeleteCategoryInList);
        }
コード例 #2
0
 public void Initialize()
 {
     _model = new PosCustomerSideModel();
     _model._mealChanged += UpdateMealInformationTest;
 }