Exemple #1
0
        public void IsPreviousPageButtonEnableTest()
        {
            CustomerFormPresentationModel model = new CustomerFormPresentationModel(new Model());
            PrivateObject        target         = new PrivateObject(model);
            List <CategoryState> categoryState  = (List <CategoryState>)target.GetFieldOrProperty("_categoriesState");

            categoryState[0].CurrentPage = 1;
            Assert.IsFalse(model.IsPreviousPageButtonEnable("漢堡"));
            categoryState[0].CurrentPage = 2;
            Assert.IsTrue(model.IsPreviousPageButtonEnable("漢堡"));
            Assert.IsFalse(model.IsPreviousPageButtonEnable("找不到"));
        }