Exemple #1
0
    	public void EditWithPost_ShouldRedirectOnSucessfulBinding()
    	{
			var product = new Product { Id = 5};
            var productViewData = new ProductViewData();
            productBuilder.Stub(
    	        x => x.ProductFromProductViewData(productViewData, productController.ModelState, productController.Request))
                .Return(product);

			productController.Edit(productViewData)
				.ReturnsRedirectToRouteResult()
				.ToAction("Edit")
				.WithRouteValue("id", "5");
    	}