Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public AzureTransactionalStateStorageTests(TestFixture fixture, ITestOutputHelper testOutput)
     : base(() => StateStorageFactory(fixture), (seed) => new TestState() { State = seed }, fixture.GrainFactory, testOutput)
 {
 }