I have a ArticleController that displays a list of articles according to a category.
public ActionResult List(string categoryname)
{
MyStronglyTypedViewData vd = new MyStronglyTypedViewData();
DBFactory factory = new DBFactory();
categoryDao = factory.GetCategoryDao();
articleDao = factory.GetArticleDao();
vd.Category = categoryDao.GetByName(categoryname);
vd.Articles = articleDao.GetByCategoryId(vd.Category.Id);
return View(vd);
}
If I was to unit test this action, what exactly would be the purpose? TO make sure the correct view is being opened?