public void GetPendingSequences_EmptyStore_EmptyCollectionReturned()
        {
            var store = new DefaultSequenceStore(new IntegrationLoggerSubstitute <DefaultSequenceStore>());

            var result = store.GetPendingSequences();

            result.Should().BeEmpty();
        }
        public async Task GetPendingSequences_WithAllCompleteOrAbortedSequences_EmptyCollectionReturned()
        {
            var store = new DefaultSequenceStore(new IntegrationLoggerSubstitute <DefaultSequenceStore>());

            await store.AddAsync(new FakeSequence("aaa", true, false, store));

            await store.AddAsync(new FakeSequence("bbb", false, true, store));

            var result = store.GetPendingSequences();

            result.Should().BeEmpty();
        }
        public async Task GetPendingSequences_WithIncompleteSequence_PendingSequencesReturned()
        {
            var store = new DefaultSequenceStore(new IntegrationLoggerSubstitute <DefaultSequenceStore>());

            await store.AddAsync(new FakeSequence("aaa", true, false, store));

            await store.AddAsync(new FakeSequence("bbb", false, true, store));

            await store.AddAsync(new FakeSequence("ccc", false, false, store));

            await store.AddAsync(new FakeSequence("ddd", false, false, store));

            var result = store.GetPendingSequences();

            result.Should().HaveCount(2);
            result.Select(sequence => sequence.SequenceId).Should().BeEquivalentTo("ccc", "ddd");
        }