mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04:00
0b2b8e9bbe
Fixed: Importing of hashed releases
37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using System;
|
|
using System.Linq;
|
|
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.Parser;
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
namespace NzbDrone.Core.Test.ParserTests
|
|
{
|
|
|
|
[TestFixture]
|
|
public class ReleaseGroupParserFixture : CoreTest
|
|
{
|
|
[TestCase("Castle.2009.S01E14.English.HDTV.XviD-LOL", "LOL")]
|
|
[TestCase("Castle 2009 S01E14 English HDTV XviD LOL", "LOL")]
|
|
[TestCase("Acropolis Now S05 EXTRAS DVDRip XviD RUNNER", "RUNNER")]
|
|
[TestCase("Punky.Brewster.S01.EXTRAS.DVDRip.XviD-RUNNER", "RUNNER")]
|
|
[TestCase("2020.NZ.2011.12.02.PDTV.XviD-C4TV", "C4TV")]
|
|
[TestCase("The.Office.S03E115.DVDRip.XviD-OSiTV", "OSiTV")]
|
|
[TestCase("The Office - S01E01 - Pilot [HTDV-480p]", "DRONE")]
|
|
[TestCase("The Office - S01E01 - Pilot [HTDV-720p]", "DRONE")]
|
|
[TestCase("The Office - S01E01 - Pilot [HTDV-1080p]", "DRONE")]
|
|
public void should_parse_release_group(string title, string expected)
|
|
{
|
|
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
|
}
|
|
|
|
[Test]
|
|
public void should_not_include_extension_in_release_roup()
|
|
{
|
|
const string path = @"C:\Test\Doctor.Who.2005.s01e01.internal.bdrip.x264-archivist.mkv";
|
|
|
|
Parser.Parser.ParsePath(path).ReleaseGroup.Should().Be("archivist");
|
|
}
|
|
}
|
|
}
|