Пример #1
0
        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());
        }
Пример #2
0
        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);
        }