The first; I know that I donβt need to test the internals of MVC, but I really need a set of tests around the data coming into our system.
How can I, hopefully, not mock the entire HTTP context, check that objectA (form assembly, dict, collection, object, etc.) does not match or does not match objectAModel?
I would not need to instantiate my controller or invoke an action. I just want to check if my new object has changed the model state.
I would just like to write
var modelState = new ModelBindingContext<objectAModel>().validate(objectA);
source
share