|
|
@ -104,44 +104,46 @@ namespace NzbDrone.Core.Test
|
|
|
|
ExceptionVerification.IgnoreWarns();
|
|
|
|
ExceptionVerification.IgnoreWarns();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", QualityTypes.DVD)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.X-viD.AC3.-HELLYWOOD", QualityTypes.DVD)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.X-viD.AC3.-HELLYWOOD", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.AC3.-HELLYWOOD", QualityTypes.DVD)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.AC3.-HELLYWOOD", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("Two.and.a.Half.Men.S08E05.720p.HDTV.X264-DIMENSION", QualityTypes.HDTV)]
|
|
|
|
[TestCase("Two.and.a.Half.Men.S08E05.720p.HDTV.X264-DIMENSION", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("this has no extention or periods HDTV", QualityTypes.SDTV)]
|
|
|
|
[TestCase("this has no extention or periods HDTV", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("Chuck.S04E05.HDTV.XviD-LOL", QualityTypes.SDTV)]
|
|
|
|
[TestCase("Chuck.S04E05.HDTV.XviD-LOL", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", QualityTypes.DVD)]
|
|
|
|
[TestCase("The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", QualityTypes.DVD)]
|
|
|
|
[TestCase("The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("The.Girls.Next.Door.S03E06.HDTV-WiDE", QualityTypes.SDTV)]
|
|
|
|
[TestCase("The.Girls.Next.Door.S03E06.HDTV-WiDE", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("Degrassi.S10E27.WS.DSR.XviD-2HD", QualityTypes.SDTV)]
|
|
|
|
[TestCase("Degrassi.S10E27.WS.DSR.XviD-2HD", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", QualityTypes.WEBDL)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", QualityTypes.WEBDL, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.720p", QualityTypes.HDTV)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.720p", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.mkv", QualityTypes.HDTV)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.mkv", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.avi", QualityTypes.SDTV)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.avi", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.xvid", QualityTypes.SDTV)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.xvid", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.divx", QualityTypes.SDTV)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15.divx", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15", QualityTypes.Unknown)]
|
|
|
|
[TestCase("Sonny.With.a.Chance.S02E15", QualityTypes.Unknown, false)]
|
|
|
|
[TestCase("Chuck - S01E04 - So Old - Playdate - 720p TV.mkv", QualityTypes.HDTV)]
|
|
|
|
[TestCase("Chuck - S01E04 - So Old - Playdate - 720p TV.mkv", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("Chuck - S22E03 - MoneyBART - HD TV.mkv", QualityTypes.HDTV)]
|
|
|
|
[TestCase("Chuck - S22E03 - MoneyBART - HD TV.mkv", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("Chuck - S01E03 - Come Fly With Me - 720p BluRay.mkv", QualityTypes.Bluray720p)]
|
|
|
|
[TestCase("Chuck - S01E03 - Come Fly With Me - 720p BluRay.mkv", QualityTypes.Bluray720p, false)]
|
|
|
|
[TestCase("Chuck - S01E03 - Come Fly With Me - 1080p BluRay.mkv", QualityTypes.Bluray1080p)]
|
|
|
|
[TestCase("Chuck - S01E03 - Come Fly With Me - 1080p BluRay.mkv", QualityTypes.Bluray1080p, false)]
|
|
|
|
[TestCase("Chuck - S11E06 - D-Yikes! - 720p WEB-DL.mkv", QualityTypes.WEBDL)]
|
|
|
|
[TestCase("Chuck - S11E06 - D-Yikes! - 720p WEB-DL.mkv", QualityTypes.WEBDL, false)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", QualityTypes.DVD)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", QualityTypes.DVD)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("Law & Order: Special Victims Unit - 11x11 - Quickie", QualityTypes.Unknown)]
|
|
|
|
[TestCase("Law & Order: Special Victims Unit - 11x11 - Quickie", QualityTypes.Unknown, false)]
|
|
|
|
[TestCase("(<a href=\"http://www.newzbin.com/browse/post/6076286/nzb/\">NZB</a>)", QualityTypes.Unknown)]
|
|
|
|
[TestCase("(<a href=\"http://www.newzbin.com/browse/post/6076286/nzb/\">NZB</a>)", QualityTypes.Unknown, false)]
|
|
|
|
[TestCase("S07E23 - [HDTV].mkv ", QualityTypes.HDTV)]
|
|
|
|
[TestCase("S07E23 - [HDTV].mkv ", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("S07E23 - [WEBDL].mkv ", QualityTypes.WEBDL)]
|
|
|
|
[TestCase("S07E23 - [WEBDL].mkv ", QualityTypes.WEBDL, false)]
|
|
|
|
[TestCase("S07E23.mkv ", QualityTypes.HDTV)]
|
|
|
|
[TestCase("S07E23.mkv ", QualityTypes.HDTV, false)]
|
|
|
|
[TestCase("S07E23 .avi ", QualityTypes.SDTV)]
|
|
|
|
[TestCase("S07E23 .avi ", QualityTypes.SDTV, false)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.DVD)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.DVD, false)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.Bluray720p)]
|
|
|
|
[TestCase("WEEDS.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.Bluray720p, false)]
|
|
|
|
[TestCase("The Voice S01E11 The Finals 1080i HDTV DD5.1 MPEG2-TrollHD", QualityTypes.Unknown)]
|
|
|
|
[TestCase("The Voice S01E11 The Finals 1080i HDTV DD5.1 MPEG2-TrollHD", QualityTypes.Unknown, false)]
|
|
|
|
[TestCase("Nikita S02E01 HDTV XviD 2HD", QualityTypes.SDTV)]
|
|
|
|
[TestCase("Nikita S02E01 HDTV XviD 2HD", QualityTypes.SDTV, false)]
|
|
|
|
public void quality_parse(string postTitle, object quality)
|
|
|
|
[TestCase("Gossip Girl S05E11 PROPER HDTV XviD 2HD", QualityTypes.SDTV, true)]
|
|
|
|
|
|
|
|
public void quality_parse(string postTitle, object quality, bool proper)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var result = Parser.ParseQuality(postTitle);
|
|
|
|
var result = Parser.ParseQuality(postTitle);
|
|
|
|
result.QualityType.Should().Be(quality);
|
|
|
|
result.QualityType.Should().Be(quality);
|
|
|
|
|
|
|
|
result.Proper.Should().Be(proper);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|