Hi Alex,
We have to convert approximately 75 test classes ranging from a few hundred lines to 1200 lines.
The problem as I see it is that Moles assemblies mock entire classes for each testset. These interfaces are then mocked more specifically at the start of the individual test. The format of the moles is much different than that of typemock as I understand it.
The stub implementation is also different.
A sample of these two main problems is included below, if you have any suggestions or experience migrating tests from moles please pass it on.
Assigning delegate to Servies Get Method of ServiceManager class.
MServiceManager.ServicesGet = () =>
{
Services.Moles.MServiceManager.MServiceCollection services = new MServiceManager.MServiceCollection();
services.GetBoolean<IStatusMessageService>(provider);
return services;
};
Creating a mock IComplexObject from the auto-generated moles/stubs assembly.
SIComplexObject view = new SIComplexObject();