我正在尝试测试Controller的Index操作。该操作使用AutoMapper将域Customer对象映射到View模型TestCustomerForm。虽然这有效,但我关心的是测试我从Index操作收到的结果的最佳方法。Controller的索引操作如下所示:publicActionResultIndex(){TestCustomerFormcust=Mapper.Map(_repository.GetCustomerByLogin(CurrentUserLoginName));returnView(cust);}它的TestMethod看起来像这样:[TestMethod]pu