public async Task TestPaginationLoadChannel() { var channel = @"elrubiusOMG"; var page = 1; var dataProvider = new YouTubeDataProvider(OAuthKeys.YouTubeValidKeys); await dataProvider.LoadChannelAsync(channel, page); Assert.IsTrue(dataProvider.HasMoreItems); IEnumerable <YouTubeSchema> result = await dataProvider.LoadMoreChannelAsync(channel, page); Assert.IsNotNull(result); Assert.IsTrue(result.Any()); }
public async Task TestInvalidOperationLoadChannel() { var channel = @"elrubiusOMG"; var pageSize = 1; var dataProvider = new YouTubeDataProvider(OAuthKeys.YouTubeValidKeys); InvalidOperationException exception = await ExceptionsAssert.ThrowsAsync<InvalidOperationException>(async () => await dataProvider.LoadMoreChannelAsync(channel, pageSize)); }
public async Task TestPaginationLoadChannel() { var channel = @"elrubiusOMG"; var page = 1; var dataProvider = new YouTubeDataProvider(OAuthKeys.YouTubeValidKeys); await dataProvider.LoadChannelAsync(channel, page); Assert.IsTrue(dataProvider.HasMoreItems); IEnumerable<YouTubeSchema> result = await dataProvider.LoadMoreChannelAsync(channel, page); Assert.IsNotNull(result); Assert.IsTrue(result.Any()); }
public async Task TestInvalidOperationLoadChannel() { var channel = @"elrubiusOMG"; var pageSize = 1; var dataProvider = new YouTubeDataProvider(OAuthKeys.YouTubeValidKeys); InvalidOperationException exception = await ExceptionsAssert.ThrowsAsync <InvalidOperationException>(async() => await dataProvider.LoadMoreChannelAsync(channel, pageSize)); }