Example #1
0
        public void ShouldNotDownloadPreviousSeasonPack()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch    = "Planet.Earth",
                Exclude       = "720p",
                Include       = "1080p",
                Disabled      = false,
                Season        = 3,
                OnlyMatchOnce = false,
                Downloads     = new List <Download>
                {
                    new Download
                    {
                        GUID = "321",
                        Name = "Planet Earth S01 1080P WEB-DL"
                    }
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "Planet Earth S02 1080P WEB-DL"
            };

            Assert.IsFalse(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #2
0
        public void ShouldNotDownloadMiniSeriesEpisodeTwice()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch    = "Planet.Earth.2",
                Exclude       = "720p",
                Include       = "1080p",
                Episode       = 2,
                OnlyMatchOnce = true,
                Disabled      = false,
                Downloads     = new List <Download>
                {
                    new Download
                    {
                        GUID = "321",
                        Name = "Planet Earth 2 E02 1080P WEB-DL"
                    }
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "Planet Earth 2 E02 1080P WEB-DL"
            };

            Assert.IsFalse(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #3
0
        public void ShouldDownloadTvShowTwice()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch    = "Planet.Earth",
                Exclude       = "720p",
                Include       = "1080p",
                Season        = 2,
                Episode       = 2,
                OnlyMatchOnce = false,
                Disabled      = false,
                Downloads     = new List <Download>
                {
                    new Download
                    {
                        GUID = "321",
                        Name = "Planet Earth S02E02 1080P WEB-DL"
                    }
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "Planet Earth S02E02 1080P WEB-DL"
            };

            Assert.IsTrue(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #4
0
        public void ShouldFailWhenCapsAreWrong()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch = "the.whole.truth",
                Exclude    = "1080P",
                Include    = "",
                Disabled   = false,
                Downloads  = new List <Download> {
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "The Whole Truth 2016 1080p WEB-DL"
            };

            Assert.IsFalse(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #5
0
        public void ShouldNotDownloadTitlesNotMatching()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch = "Acantilado",
                Exclude    = "",
                Include    = "",
                Disabled   = false,
                Downloads  = new List <Download> {
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "The Whole Truth 2016 1080p WEB-DL"
            };

            Assert.IsFalse(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #6
0
        public void ShouldNotDownloadTheSameTorrentTwice()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch = "*The.Whole.Truth",
                Exclude    = "",
                Include    = "",
                Disabled   = false,
                Downloads  = new List <Download> {
                    new Download {
                        GUID = "123", Name = "The Whole Truth 2016 1080p WEB-DL"
                    }
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "The Whole Truth 2016 1080p WEB-DL"
            };

            Assert.IsFalse(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #7
0
        public void ShouldBeAbleToSkipCharacters()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch = "*The*Truth",
                Exclude    = "",
                Include    = "",
                Disabled   = false,
                Downloads  = new List <Download> {
                }
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "The Whole Truth 2016 1080p WEB-DL"
            };

            Assert.IsTrue(FeedFilterer.IsMatch(Filter, Torrent));
        }
Example #8
0
        public void ShouldNotDownloadWhenHasDownloadedBeforeAndOnlyMatchOnce()
        {
            Feed = new Feed
            {
                Id = 1
            };

            Filter = new Filter
            {
                TitleMatch = "*",
                Exclude    = "",
                Include    = "",
                Disabled   = false,
                Downloads  = new List <Download> {
                    new Download {
                        GUID = "321", Name = "The Whole Truth 2016 720p WEB-DL"
                    }
                },
                OnlyMatchOnce = true
            };

            Torrent = new Torrent
            {
                GUID = "123",
                Name = "The Whole Truth 2016 1080p WEB-DL"
            };

            Assert.IsFalse(FeedFilterer.IsMatch(Filter, Torrent));
        }