BaseControllerTest.PrepareController is enough to configure controller properties, such as PropertyBag and Context
[TestClass]
public ProjectsControllerTest : BaseControllerTest
{
[TestMethod]
public void List()
{
var controller = new ProjectsController();
PrepareController(controller);
controller.List();
Assert.IsInstanceOfType(typeof(IEnumerable<Project>),controller.PropertyBag["Projects"]);
}
}
But now to run the entire pipeline for integration testing, including filters declared in action attributes?
EDIT: I'm not interested in viewing the render, just the controller logic along with declarative filters.
I like the idea of transferring a significant amount of view setting logic into action filters, and I'm not sure if I need an additional level of integration tests, or is it better to do this with Selenium?
source
share