public void details() { var controller = new StoreController(new CategoryBLL(new CategoryStub()), new ProductBLL(new ProductStub())); var prod = new Product() { ProductId = 1, CategoryId = 1, Name = "lololo", Price = 123, ProductPicUrl = "/Content/Images/placeholder.gif" }; var result = (ViewResult)controller.Details(1); var resultProd = (Product)result.Model; Assert.AreEqual(result.ViewName, ""); Assert.AreEqual(resultProd.Name, prod.Name); }