Пример #1
0
        public void ThereShouldBeSubtitlesForHIMYMS01E01()
        {
            var checker = new Napisy24Checker();

            var result = checker.Check("How I Met Your Mother", "s01e01");

            Assert.AreEqual(SubtitlesType.Polish, result);
        }
Пример #2
0
        public void ThereShouldNotBeSubtitlesForHIMYMS08E021()
        {
            var checker = new Napisy24Checker();

            var result = checker.Check("How I Met Your Mother", "s08e02");

            Assert.AreEqual(SubtitlesType.English, result);
        }
Пример #3
0
 private static Serial GetSerialViewModel(string detailsXml)
 {
     var doc =
         RequestHelper.FetchXmlFromUrlAsXDocument(detailsXml);
     var parser = new TvRageParser(doc);
     var model = parser.Parse();
     var checker = new Napisy24Checker();
     var torrentChecker = new TorrentChecker();
     foreach (var episode in model.GetAllEpisodes(true))
     {
         episode.Subtitles = checker.Check(episode.SerialName, episode.Number);
         episode.HasTorrent = torrentChecker.Check(episode.SerialName, episode.Number);
     }
     return model;
 }