public void TestHelperStreamInfoSourceOnEmpty() { IWebClient mockWebClient = GetMockWebClient(); HidiveStreamInfoSource.HelperStreamInfoSource source = new HidiveStreamInfoSource.HelperStreamInfoSource("https://www.hidive.com/empty", mockWebClient); Assert.Throws <NoMatchingHtmlException>(() => source.GetAnimeStreamInfoAsync(CancellationToken.None).GetAwaiter().GetResult()); }
public void TestHelperStreamInfoSource() { IWebClient mockWebClient = GetMockWebClient(); HidiveStreamInfoSource.HelperStreamInfoSource source = new HidiveStreamInfoSource.HelperStreamInfoSource("https://www.hidive.com/tv", mockWebClient); ICollection <AnimeStreamInfo> streams = source.GetAnimeStreamInfoAsync(CancellationToken.None).GetAwaiter().GetResult(); AssertTvStreamsAreCorrect(streams); }