Reputation: 3515
I'm following apress mvc4 receipts book and I'm struggle with following example
// act
ViewResult result = controller.Index() as ViewResult;
// assert
Assert.IsInstanceOfType(result.Model,typeof(List<Architect>))
this line
Assert.IsInstanceOfType(result.Model,typeof(List<Architect>))
throws two errors
Upvotes: 3
Views: 1156
Reputation: 23107
you need to swap your arguments
Assert.IsInstanceOfType(typeof(List<Architect>),result.Model);
The best overloaded method match for Nunit.Framework.Assert.IsInstanceOfType(System.Type, object) has some invalid arguments
It says that first argument is System.Type
, second object
Upvotes: 3