Is there a workaround for setting [HostType(“Moles”)] when dealing with anonymous methods in MSpec?
问题 I'm using Pex and Moles for my low-level unit testing, but I'm also exploring MSpec for business-logic validation, and would like to keep using Moles for consistency. The problem, I think, is that MSPec uses anonymous methods, so there's no way to apply the HostType("Moles") attribute. For example: Because of = () => employeeList = EmployeeManager.GetUsersByRoles(rolesToLoad); It should_return_a_list_of_employees = () => employeeList.ShouldNotBeNull(); I'm mocking the Roles provider called