I had
class Voo
{
private static AnotherClass Doo(int id)
{
//do some stuff with id then return object of AnotherClass
return x[0];
}
}
and used this private with moles
MVoo.DooInt32 = delegate ...
NOW I changed the method to:
class Voo
{
private static AnotherClass Doo(string a, object b)
{
//do some stuff with a and b then return object of AnotherClass
return x[0];
}
}
BUT moles does not give me the new signature. Sill MVoo.DooIn开发者_如何学Got32 but I expect MVoo.DooStringObject
I removed the moles reference, cleaned, rebuilded. No positive result so far.
Any Ideas?
You need to be sure to delete the mole assembly file (.dll), rebuild the test project without the mole type, and then add it back in. This process is thorough, and has always worked for me, in this situation:
- Remove the mole assembly reference from the test project
- Delete the .moles file, named after the assembly in question
- In Solution Explorer, show all files in the test project
- Expand the hidden "MolesAssemblies" folder
- Delete the desired _.Moles.dll file and corresponding XML files
- Remove (not delete) test files that reference the mole assembly
- Rebuild the test project
- Select the "Add Moles Assembly" context menu option, on the desired test project reference
- Add test files that were temporarily removed from the project
- Rebuild the test project
You have to delete your moles file for that assembly something like voo.moles and then create a new one.
精彩评论