Ejemplo n.º 1
0
        public async Task NextMethodThrowsExceptionWhenIfMaxRetryAttemptIsReach()
        {
            var stateProvider = new InMemoryStateProvider();
            
            stateProvider.UpdateValue = false;

            var sequenceGenerator = new SequenceGenerator(stateProvider);

            var sequence = await CreateSequence(stateProvider);

            var sequenceKey = await stateProvider.AddAsync(sequence);

             await sequenceGenerator.NextAsync(sequenceKey);
        }
Ejemplo n.º 2
0
        public async Task NextMethodThrowsExceptionIfSequencyCanNotBeFound()
        {
            //var stateProvider = GetStateProvider();
            var stateProvider = new InMemoryStateProvider();

            var sequenceGenerator = new SequenceGenerator(stateProvider);


            var nextValue1 = await sequenceGenerator.NextAsync(new SequenceKey { Value = "1234"});
        }