예제 #1
0
        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());
        }
예제 #2
0
        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);
        }