public async Task SkipLastWithNullableDecimalSourceWithCountIsEquivalentToSkipLastTest() { // Arrange // Arrange 'queryAdapter' parameter var queryAdapter = await GetQueryAdapterAsync(DisallowAll); // Arrange 'source' parameter var source = GetQueryable <decimal?>(); // Arrange 'asyncSource' parameter var asyncSource = queryAdapter.GetAsyncQueryable <decimal?>(); // Arrange 'count' parameter var count = 5; // Arrange 'expectedResult' parameter var expectedResult = EnumerableExtension .SkipLast <decimal?>(source, count); // Act var result = await AsyncQueryable.SkipLast <decimal?>(asyncSource, count).ToListAsync().ConfigureAwait(false); // Assert Assert.Equal(expectedResult, result); }
public async Task SkipLastWithDoubleSourceWithCountNullSourceThrowsArgumentNullExceptionTest() { // Arrange // Arrange 'queryAdapter' parameter var queryAdapter = await GetQueryAdapterAsync(DisallowAll); // Arrange 'asyncSource' parameter IAsyncQueryable <double> asyncSource = null !; // Arrange 'count' parameter var count = 5; // Act // - // Assert await Assert.ThrowsAsync <ArgumentNullException>(async() => { await AsyncQueryable.SkipLast <double>(asyncSource, count).ToListAsync().ConfigureAwait(false); }); }