public void IsNextPageButtonEnableTest() { CustomerFormPresentationModel model = new CustomerFormPresentationModel(new Model()); PrivateObject target = new PrivateObject(model); List <CategoryState> categoryState = (List <CategoryState>)target.GetFieldOrProperty("_categoriesState"); categoryState[0].CurrentPage = 0; Assert.IsTrue(model.IsNextPageButtonEnable("漢堡")); categoryState[0].CurrentPage = 1; Assert.IsFalse(model.IsNextPageButtonEnable("漢堡")); Assert.IsFalse(model.IsNextPageButtonEnable("找不到")); }