public void RemoveOnePageTest() { 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); model.RemoveOnePage("漢堡"); categoryState = (List <CategoryState>)target.GetFieldOrProperty("_categoriesState"); Assert.AreEqual(categoryState[0].CurrentPage, 1); }