public void RemoveTimeoutByIdOnNonExistantIdDoesNotRemoveOtherTimeout(
            MongoTimeoutPersister sut,
            MongoDatabaseFactory factory,
            Timeout.Core.TimeoutData timeoutData)
        {
            factory.ResetTimeoutCollection();

            sut.Add(timeoutData);

            sut.RemoveTimeoutBy(Guid.NewGuid());

            factory.RetrieveAllTimeouts().Should().HaveCount(1);
        }
        public void RemoveTimeoutByIdRemovesCorrectTimeoutAndDoesNotRemoveOtherTimeout(
            MongoTimeoutPersister sut,
            MongoDatabaseFactory factory,
            Timeout.Core.TimeoutData timeoutData1,
            Timeout.Core.TimeoutData timeoutData2)
        {
            factory.ResetTimeoutCollection();

            sut.Add(timeoutData1);
            sut.Add(timeoutData2);

            sut.RemoveTimeoutBy(timeoutData2.SagaId);

            var remainingTimeouts = factory.RetrieveAllTimeouts().ToList();
            remainingTimeouts.Should().HaveCount(1);

            remainingTimeouts.First().SagaId.Should().Be(timeoutData1.SagaId);
        }
        public void RemoveTimeoutByIdOnEmptyTimeoutCollection(
            MongoTimeoutPersister sut,
            MongoDatabaseFactory factory,
            Timeout.Core.TimeoutData timeoutData)
        {
            factory.ResetTimeoutCollection();

            sut.RemoveTimeoutBy(timeoutData.SagaId);

            factory.RetrieveAllTimeouts().Should().HaveCount(0);
        }