示例#1
0
        public void AddOnePageTest()
        {
            CustomerFormPresentationModel model = new CustomerFormPresentationModel(new Model());

            model.UpdateTotalPage(15, 0);
            model.AddOnePage("漢堡");
            PrivateObject        target        = new PrivateObject(model);
            List <CategoryState> categoryState = (List <CategoryState>)target.GetFieldOrProperty("_categoriesState");

            Assert.AreEqual(categoryState[0].CurrentPage, 2);
        }