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)); }
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]); } }