I have a domain services class that runs on the server in a silverlight application. I.e. the class is defined like this,
public class UpgradeToolDomainService : DomainService
{
...
}
I am using RIA services which means that on the client it generates code which looks like this,
public sealed partial class UpgradeToolDomainContext : DomainContext
{
...
}
The problem with that is I would like to mock the UpgradeToolDomainContext using Rhino mocks when unit testing my client side code, but the class is sealed and Rhino mocks doesn t support mocking sealed classes.
What do you think?? I.e. is it possible to change the generated code to not be sealed? Or any other obvious solution?