For my unittests I want to use Moles to run the tests outside the Windows Azure development factory. By making a mole assembly for Microsoft.WindowsAzure.ServiceRuntime I would be on my way. But I’m getting strange error messages: there is no stub being generated for Microsoft.WindowsAzure.ServiceRuntime.RoleInstance and I cannot implement it myself.
public abstract class RoleInstance { public abstract int FaultDomain { get; } public abstract string Id { get; } public abstract IDictionary<string, RoleInstanceEndpoint> InstanceEndpoints { get; } public abstract Role Role { get; } public abstract int UpdateDomain { get; } }
The object contains only property get operations and is defined as an abstract class. Implementing the property get operations gives me error messages about not implementing the property set operations. Implementing the property set operations gives me error messages error messages about the property set operations not being defined in the (abstract) base class and cannot be overwritten.
[/edit]
I used Reflector to look at te code. I noticed every property had an internal set operation. Looks like the compiler wants to do something with this, bus doesn’t know what. That explains the error messages. Maybe my post with Microsoft resolves this issue.
[/edit]
Peli admits this is a strange situation and sees no resolution in Moles in the near future. So for now no Moles for Windows Azure.