For the Azure Service Fabric State Service, you can enter IReliableStateManageras follows:
ServiceRuntime.RegisterServiceAsync("MyServiceType", context =>
{
IReliableStateManager stateManager = new ReliableStateManager(context);
return new MyService(stateManager);
}
And so you can make fun IStateManagerof unit tests for MyService.
The same is not possible for a player with a fortune. IActorStateManagerIt is only the internal market: Microsoft.ServiceFabric.Actors.Runtime.ActorStateManager. So, how do I unit test a discreet actor?
At some point in my actor methods, the call is made to IActorStateManager, but since I cannot introduce this dependency, unit tests seem impossible.
Is there a way around this or is there another solution?
source
share