私はapress mvc4の領収書に従っていますが、次の例に苦労しています
// act
ViewResult result = controller.Index() as ViewResult;
// assert
Assert.IsInstanceOfType(result.Model,typeof(List<Architect>))
この行
Assert.IsInstanceOfType(result.Model,typeof(List<Architect>))
2つのエラーをスローします
- Argument1: オブジェクトから System.Type に変換できません
- Nunit.Framework.Assert.IsInstanceOfType(System.Type, object) に最適なオーバーロードされたメソッドの一致には、いくつかの無効な引数があります