public void UpdateTotalPageTest() { CustomerFormPresentationModel model = new CustomerFormPresentationModel(new Model()); model.UpdateTotalPage(10, 0); PrivateObject target = new PrivateObject(model); List <CategoryState> categoryState = (List <CategoryState>)target.GetFieldOrProperty("_categoriesState"); Assert.AreEqual(categoryState[0].TotalPage, 2); model.UpdateTotalPage(6, 1); Assert.AreEqual(categoryState[1].TotalPage, 1); }