Exemple #1
0
        public async Task GetChannelItemsAsync()
        {
            IChannel ch = ChannelFactory.CreateChannel(SiteType.Tapochek);

            if (ch == null)
            {
                return;
            }
            ch.ID = "27253";

            ch.ChannelCookies = db.ReadCookies(ch.Site);
            if (ch.ChannelCookies == null)
            {
                await ChannelFactory.FillChannelCookieNetAsync(ch).ConfigureAwait(false);
            }
            IEnumerable <VideoItemPOCO> t = (await tf.GetChannelItemsAsync(ch, 0).ConfigureAwait(false)).ToList();

            if (!t.Any())
            {
                await ChannelFactory.FillChannelCookieNetAsync(ch).ConfigureAwait(false);

                t = (await tf.GetChannelItemsAsync(ch, 0).ConfigureAwait(false)).ToList();
            }
            Assert.IsTrue(t.Any());
        }