addmodelerror

Is it possible to unit test some AddModelError results in ASP.NET MVC?

Hi folks, i've got a controller method which returns a RedirectToActionResult (sucess!) or a ViewResult (failed with error messages). If the business logic fails, i add the error messages to the AddModelError property. Is there any way i can test this in my MS Unit tests? I also have moq, if that helps too. (i don't believe moq is r...

ModelState.AddModelError on form level with ASP.NET MVC 2 RC

In the previous versions on ASP.NET MVC, you could use ModelState.AddModelError("_FORM", "error") to make an error on the form-level instead of a property-level. This seems not to work anymore with the new RC of ASP.NET MVC 2. Is there another way how to do it? I use <%= Html.ValidationSummary() %> at my View-file... ...