public void Then_the_gap_positions_should_be_empty() { var message = _fixture .Build <ConfigurableStreamMessage>() .WithPosition(_sut.ExpectedNextPosition) .Create(); _sut.DetermineGapPositions(message).Should().BeEmpty(); }
public void Then_the_gap_positions_should_be_empty() { var position = _sut .Position .CreateRandomLowerValue(); var message = _fixture .Build <ConfigurableStreamMessage>() .WithPosition(position) .Create(); _sut.DetermineGapPositions(message).Should().BeEmpty(); }
public void Then_the_gap_positions_should_from_expected_to_current_message_minus_one() { StreamMessage message = _fixture .Build <ConfigurableStreamMessage>() .WithPosition(_sut .ExpectedNextPosition .CreateRandomHigherValue()) .Create(); var expectedGapPositions = new List <long>(); for (var i = _sut.ExpectedNextPosition; i < message.Position; i++) { expectedGapPositions.Add(i); } _sut.DetermineGapPositions(message) .Should() .Equal(expectedGapPositions) .And.BeInAscendingOrder(); }