private static async Task <ITransactionalStateStorage <TestState> > StateStorageFactory(TestFixture fixture) { var table = await InitTableAsync(NullLogger.Instance); var jsonSettings = TransactionalStateFactory.GetJsonSerializerSettings( fixture.HostedCluster.ServiceProvider.GetRequiredService <ITypeResolver>(), fixture.GrainFactory); var stateStorage = new AzureTableTransactionalStateStorage <TestState>(table, $"{partition}{DateTime.UtcNow.Ticks}", jsonSettings, NullLoggerFactory.Instance.CreateLogger <AzureTableTransactionalStateStorage <TestState> >()); return(stateStorage); }
public AzureTransactionalStateStorageTests(TestFixture fixture, ITestOutputHelper testOutput) : base(() => StateStorageFactory(fixture), (seed) => new TestState() { State = seed }, fixture.GrainFactory, testOutput) { }