From dfb8d2ea0f3c78cfd2c865b35f122625e1234d1b Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 26 Dec 2021 14:36:30 -0600 Subject: [PATCH] additional testcase obfuscation closes #6850 --- .../FormatVideoCodecFixture.cs | 30 +++++----- .../MovieImport/ImportDecisionMakerFixture.cs | 14 ++--- .../ParserTests/ParserFixture.cs | 60 +++++++++---------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs index 5bab3401e..382e77ecc 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/MediaInfoFormatterTests/FormatVideoCodecFixture.cs @@ -10,33 +10,33 @@ public class FormatVideoCodecFixture : TestBase { [TestCase("mpeg2video, ", "Droned.S01E02.1080i.HDTV.DD5.1.MPEG2-NTb", "MPEG2")] [TestCase("mpeg2video, ", "", "MPEG2")] - [TestCase("mpeg1video, ", "The.Simpsons.S13E04.INTERNAL-ANiVCD.mpg", "MPEG")] - [TestCase("vc1, WVC1", "B.N.S04E18.720p.WEB-DL", "VC1")] + [TestCase("mpeg1video, ", "The.Series.S13E04.INTERNAL-ANiVCD.mpg", "MPEG")] + [TestCase("vc1, WVC1", "T.N.S04E18.720p.WEB-DL", "VC1")] [TestCase("vc1, V_MS/VFW/FOURCC/WVC1", "", "VC1")] - [TestCase("vc1, WMV3", "It's Always Sunny S07E13 The Gang's RevengeHDTV.XviD-2HD.avi", "VC1")] - [TestCase("h264, V.MPEG4/ISO/AVC", "pd.2015.S03E08.720p.iP.WEBRip.AAC2.0.H264-BTW", "h264")] - [TestCase("h264, V_MPEG4/ISO/AVC", "Resistance.2019.S01E03.1080p.RTE.WEB-DL.AAC2.0.x264-RTN", "x264")] + [TestCase("vc1, WMV3", "Series Title S09E13 The Radarr's RevengeHDTV.XviD-2HD.avi", "VC1")] + [TestCase("h264, V.MPEG4/ISO/AVC", "Series.2015.S03E08.720p.iP.WEBRip.AAC2.0.H264-BTW", "h264")] + [TestCase("h264, V_MPEG4/ISO/AVC", "Serie.2019.S01E03.1080p.RTE.WEB-DL.AAC2.0.x264-RTN", "x264")] [TestCase("wmv1, WMV1", "Droned.wmv", "WMV")] [TestCase("wmv2, WMV2", "Droned.wmv", "WMV")] [TestCase("mpeg4, XVID", "", "XviD")] [TestCase("mpeg4, DIVX", "", "DivX")] [TestCase("mpeg4, divx", "", "DivX")] [TestCase("mpeg4, DIV3", "spsm.dvdrip.divx.avi'.", "DivX")] - [TestCase("msmpeg4, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")] - [TestCase("msmpeg4v2, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")] - [TestCase("msmpeg4v3, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")] + [TestCase("msmpeg4, DIV3", "Movie the Title (1976) 360p MPEG Audio.avi", "DivX")] + [TestCase("msmpeg4v2, DIV3", "Movie the Title (1976) 360p MPEG Audio.avi", "DivX")] + [TestCase("msmpeg4v3, DIV3", "Movie the Title (1976) 360p MPEG Audio.avi", "DivX")] [TestCase("vp6, 4", "Top Gear - S12E01 - Lorries - SD TV.flv", "VP6")] - [TestCase("vp7, VP70", "Sweet Seymour.avi", "VP7")] - [TestCase("vp8, V_VP8", "Dick.mkv", "VP8")] - [TestCase("vp9, V_VP9", "Roadkill Ep3x11 - YouTube.webm", "VP9")] - [TestCase("h264, x264", "Ghost Advent - S04E05 - Stanley Hotel SDTV.avi", "x264")] - [TestCase("hevc, V_MPEGH/ISO/HEVC", "The BBT S11E12 The Matrimonial Metric 1080p 10bit AMZN WEB-DL", "h265")] + [TestCase("vp7, VP70", "Movie the Title.avi", "VP7")] + [TestCase("vp8, V_VP8", "Movie the Title.mkv", "VP8")] + [TestCase("vp9, V_VP9", "Series the Title Ep3x11 - YouTube.webm", "VP9")] + [TestCase("h264, x264", "Series the Title - S04E05 - Stanley Hotel SDTV.avi", "x264")] + [TestCase("hevc, V_MPEGH/ISO/HEVC", "Series the Title S11E12 The Radarr Metric 1080p 10bit AMZN WEB-DL", "h265")] [TestCase("mpeg4, mp4v-20", "", "")] - [TestCase("mpeg4, XVID", "American.Chopper.S06E07.Mountain.Creek.Bike.DSR.XviD-KRS", "XviD")] + [TestCase("mpeg4, XVID", "Series the Title.S06E07.Mountain.Radarr.DSR.XviD-KRS", "XviD")] [TestCase("rpza, V_QUICKTIME", "Custom", "")] [TestCase("mpeg4, FMP4", "", "")] [TestCase("mpeg4, MP42", "", "")] - [TestCase("mpeg4, mp43", "Bubble.Guppies.S01E13.480p.WEB-DL.H.264-BTN-Custom", "")] + [TestCase("mpeg4, mp43", "Series the Title.S01E13.480p.WEB-DL.H.264-BTN-Custom", "")] public void should_format_video_format(string videoFormatPack, string sceneName, string expectedFormat) { var split = videoFormatPack.Split(new string[] { ", " }, System.StringSplitOptions.None); diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs index 953a19541..94c427b0b 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/ImportDecisionMakerFixture.cs @@ -68,12 +68,12 @@ public void Setup() { Movie = _movie, Quality = _quality, - Path = @"C:\Test\Unsorted\The.Office.2018.DVDRip.XviD-OSiTV.avi" + Path = @"C:\Test\Unsorted\The.Movie.2018.DVDRip.XviD-OSiTV.avi" }; _fileInfo = new ParsedMovieInfo { - MovieTitles = new List { "The Office" }, + MovieTitles = new List { "The Movie" }, Year = 2018, Quality = _quality }; @@ -82,7 +82,7 @@ public void Setup() .Setup(c => c.ParseMinimalPathMovieInfo(It.IsAny())) .Returns(_fileInfo); - GivenVideoFiles(new List { @"C:\Test\Unsorted\The.Office.2018.DVDRip.XviD-OSiTV.avi".AsOsAgnostic() }); + GivenVideoFiles(new List { @"C:\Test\Unsorted\The.Movie.2018.DVDRip.XviD-OSiTV.avi".AsOsAgnostic() }); } private void GivenSpecifications(params Mock[] mocks) @@ -178,9 +178,9 @@ public void should_not_blowup_the_process_due_to_failed_parse() _videoFiles = new List { - "The.Office.S03E115.DVDRip.XviD-OSiTV", - "The.Office.S03E115.DVDRip.XviD-OSiTV", - "The.Office.S03E115.DVDRip.XviD-OSiTV" + "The.Movie.2021.DVDRip.XviD-OSiTV", + "The.Movie.2021.DVDRip.XviD-OSiTV", + "The.Movie.2021.DVDRip.XviD-OSiTV" }; GivenVideoFiles(_videoFiles); @@ -222,7 +222,7 @@ public void should_return_a_decision_when_exception_is_caught() _videoFiles = new List { - "The.Office.S03E115.DVDRip.XviD-OSiTV" + "The.Movie.2021.DVDRip.XviD-OSiTV" }; GivenVideoFiles(_videoFiles); diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 101e8cdb1..8ca559812 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -106,62 +106,62 @@ public void should_parse_german_movie(string postTitle, string title, string edi } } - [TestCase("L'hypothèse.du.tableau.volé.AKA.The.Hypothesis.of.the.Stolen.Painting.1978.1080p.CINET.WEB-DL.AAC2.0.x264-Cinefeel.mkv", + [TestCase("L'hypothèse.du.movie.volé.AKA.The.Hypothesis.of.the.Movie.Title.1978.1080p.CINET.WEB-DL.AAC2.0.x264-Cinefeel.mkv", new string[] { - "L'hypothèse du tableau volé AKA The Hypothesis of the Stolen Painting", - "L'hypothèse du tableau volé", - "The Hypothesis of the Stolen Painting" + "L'hypothèse du movie volé AKA The Hypothesis of the Movie Title", + "L'hypothèse du movie volé", + "The Hypothesis of the Movie Title" })] - [TestCase("Akahige.AKA.Red.Beard.1965.CD1.CRiTERiON.DVDRip.XviD-KG.avi", + [TestCase("Skjegg.AKA.Rox.Beard.1965.CD1.CRiTERiON.DVDRip.XviD-KG.avi", new string[] { - "Akahige AKA Red Beard", - "Akahige", - "Red Beard" + "Skjegg AKA Rox Beard", + "Skjegg", + "Rox Beard" })] - [TestCase("Akasen.chitai.AKA.Street.of.Shame.1956.1080p.BluRay.x264.FLAC.1.0.mkv", + [TestCase("Kjeller.chitai.AKA.Basement.of.Shame.1956.1080p.BluRay.x264.FLAC.1.0.mkv", new string[] { - "Akasen chitai AKA Street of Shame", - "Akasen chitai", - "Street of Shame" + "Kjeller chitai AKA Basement of Shame", + "Kjeller chitai", + "Basement of Shame" })] - [TestCase("Time.Under.Fire.(aka.Beneath.the.Bermuda.Triangle).1997.DVDRip.x264.CG-Grzechsin.mkv", + [TestCase("Radarr.Under.Water.(aka.Beneath.the.Code.Freeze).1997.DVDRip.x264.CG-Grzechsin.mkv", new string[] { - "Time Under Fire (aka Beneath the Bermuda Triangle)", - "Time Under Fire", - "Beneath the Bermuda Triangle" + "Radarr Under Water (aka Beneath the Code Freeze)", + "Radarr Under Water", + "Beneath the Code Freeze" })] - [TestCase("Nochnoy.prodavet. AKA.Graveyard.Shift.2005.DVDRip.x264-HANDJOB.mkv", + [TestCase("Radarr.prodavet. AKA.Radarr.Shift.2005.DVDRip.x264-HANDJOB.mkv", new string[] { - "Nochnoy prodavet AKA Graveyard Shift", - "Nochnoy prodavet", - "Graveyard Shift" + "Radarr prodavet AKA Radarr Shift", + "Radarr prodavet", + "Radarr Shift" })] [TestCase("AKA.2002.DVDRip.x264-HANDJOB.mkv", new string[] { "AKA" })] - [TestCase("Unbreakable.2000.BluRay.1080p.DTS.x264.dxva-EuReKA.mkv", + [TestCase("KillRoyWasHere.2000.BluRay.1080p.DTS.x264.dxva-EuReKA.mkv", new string[] { - "Unbreakable" + "KillRoyWasHere" })] - [TestCase("Aka Ana (2008).avi", + [TestCase("Aka Rox (2008).avi", new string[] { - "Aka Ana" + "Aka Rox" })] - [TestCase("Return to Return to Nuke 'em High aka Volume 2 (2018) 1080p.mp4", + [TestCase("Return Earth to Normal 'em High aka World 2 (2022) 1080p.mp4", new string[] { - "Return to Return to Nuke 'em High aka Volume 2", - "Return to Return to Nuke 'em High", - "Volume 2" + "Return Earth to Normal 'em High aka World 2", + "Return Earth to Normal 'em High", + "World 2" })] public void should_parse_movie_alternative_titles(string postTitle, string[] parsedTitles) { @@ -225,8 +225,8 @@ public void should_parse_multi_language(string postTitle) parsed.Languages.Should().Contain(Language.English, "Added by the multi tag in the release name"); } - [TestCase("The Italian Job 2008 [tt1234567] 720p BluRay X264", "tt1234567")] - [TestCase("The Italian Job 2008 [tt12345678] 720p BluRay X264", "tt12345678")] + [TestCase("That Italian Movie 2008 [tt1234567] 720p BluRay X264", "tt1234567")] + [TestCase("That Italian Movie 2008 [tt12345678] 720p BluRay X264", "tt12345678")] public void should_parse_imdb_in_title(string postTitle, string imdb) { var parsed = Parser.Parser.ParseMovieTitle(postTitle, true);