public void TestHelperStreamInfoSourceOnEmpty() { IWebClient mockWebClient = GetMockWebClient(); HuluStreamInfoSource.HuluStartPageStreamInfoSource source = new HuluStreamInfoSource.HuluStartPageStreamInfoSource(3, mockWebClient); Assert.Throws <NoMatchingHtmlException>(() => source.GetAnimeStreamInfoAsync(CancellationToken.None).GetAwaiter().GetResult()); }
public void TestHelperStreamInfoSource() { IWebClient mockWebClient = GetMockWebClient(); HuluStreamInfoSource.HuluStartPageStreamInfoSource source = new HuluStreamInfoSource.HuluStartPageStreamInfoSource(1, mockWebClient); ICollection <AnimeStreamInfo> streams = source.GetAnimeStreamInfoAsync(CancellationToken.None).GetAwaiter().GetResult(); streams.Should().BeEquivalentTo(ExpectedFirstPageStreamInfo); }