Beispiel #1
0
        public async Task GetEventsBetween_GetAllElements_ArrayShouldBeEquivalentToSource()
        {
            var arraySize    = 6;
            var array        = _fixture.CreateMany <PayloadEvent>(arraySize).ToArray();
            var dataProvider = new ArrayDataProvider(array);
            var actual       = await dataProvider.GetEventsBetweenAsync(0, 5);

            actual.Should().BeEquivalentTo(array);
        }
Beispiel #2
0
        public async Task GetEventsBetween_GetSubsequence_EquivalentElements()
        {
            var arraySize    = 6;
            var array        = _fixture.CreateMany <PayloadEvent>(arraySize).ToArray();
            var dataProvider = new ArrayDataProvider(array);
            var events       = await dataProvider.GetEventsBetweenAsync(2, 3);

            var actual = events.ToArray();

            actual.Length.Should().Be(2);
            actual[0].Should().BeEquivalentTo(array[2]);
            actual[1].Should().BeEquivalentTo(array[3]);
        }