public void TestHelperStreamInfoSourceOnEmpty() { IWebClient mockWebClient = GetMockWebClient(); FunimationStreamInfoSource.HelperStreamInfoSource source = new FunimationStreamInfoSource.HelperStreamInfoSource(mockWebClient, "https://www.funimation.com/shows/all-shows/?sort=show&p=5"); Assert.Throws <NoMatchingHtmlException>(() => source.GetAnimeStreamInfoAsync(CancellationToken.None).GetAwaiter().GetResult()); }
public void TestHelperStreamInfoSource() { IWebClient mockWebClient = GetMockWebClient(); FunimationStreamInfoSource.HelperStreamInfoSource source = new FunimationStreamInfoSource.HelperStreamInfoSource(mockWebClient, "https://www.funimation.com/shows/all-shows/?sort=show&p=1"); ICollection <AnimeStreamInfo> streams = source.GetAnimeStreamInfoAsync(CancellationToken.None).GetAwaiter().GetResult(); streams.Should().BeEquivalentTo(ExpectedFirstPageStreamInfo); }