Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [AcceptVerbs(HttpVerbs.Get)]
- public ActionResult AddProduct(Product product)
- {
- }
- public void Catalog_AddProduct()
- {
- CatalogController controller = new CatalogController();
- // some mocking for controller context, setting form values etc...
- controller.AddProduct(// ?);
- }
- [TestMethod()]
- public void AddProductTest()
- {
- CatalogController target = new CatalogController(/*testing variables*/);
- target.AddProduct(new Product { /* product details for testing */ });
- // Test the results
- }
Add Comment
Please, Sign In to add comment