Exemplo n.º 1
0
        public void GetEventAtIndex_IndexOutOfRange_ExceptionThrow(long index)
        {
            var arraySize    = 6;
            var array        = _fixture.CreateMany <PayloadEvent>(arraySize).ToArray();
            var dataProvider = new ArrayDataProvider(array);

            Assert.ThrowsAsync <IndexOutOfRangeException>(async() => await dataProvider.GetEventAtIndexAsync(index));
        }
Exemplo n.º 2
0
        public async Task GetEventAtIndex_SimpleValue_ReturnedEquals()
        {
            var arraySize    = 6;
            var array        = _fixture.CreateMany <PayloadEvent>(arraySize).ToArray();
            var dataProvider = new ArrayDataProvider(array);

            for (int i = 0; i < arraySize; i++)
            {
                var value = await dataProvider.GetEventAtIndexAsync(i);

                value.Should().BeEquivalentTo(array[i]);
            }
        }