mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Moved duplicated NormalizePath method to PathExtentions
This commit is contained in:
parent
95d1832379
commit
6778a6ed99
9 changed files with 54 additions and 60 deletions
|
@ -199,16 +199,7 @@ namespace NzbDrone.Core.Test
|
|||
result.Should().Be(seriesName);
|
||||
}
|
||||
|
||||
[TestCase(@"c:\test\", @"c:\test")]
|
||||
[TestCase(@"c:\\test\\", @"c:\test")]
|
||||
[TestCase(@"C:\\Test\\", @"C:\Test")]
|
||||
[TestCase(@"C:\\Test\\Test\", @"C:\Test\Test")]
|
||||
[TestCase(@"\\Testserver\Test\", @"\\Testserver\Test")]
|
||||
public void Normalize_Path(string dirty, string clean)
|
||||
{
|
||||
var result = Parser.NormalizePath(dirty);
|
||||
result.Should().Be(clean);
|
||||
}
|
||||
|
||||
|
||||
[TestCase("CaPitAl", "capital")]
|
||||
[TestCase("peri.od", "period")]
|
||||
|
@ -316,19 +307,6 @@ namespace NzbDrone.Core.Test
|
|||
var result = Parser.ParseLanguage(postTitle);
|
||||
result.Should().Be(language);
|
||||
}
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentException), ExpectedMessage = "Path can not be null or empty")]
|
||||
public void normalize_path_exception_empty()
|
||||
{
|
||||
Parser.NormalizePath("");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentException), ExpectedMessage = "Path can not be null or empty")]
|
||||
public void normalize_path_exception_null()
|
||||
{
|
||||
Parser.NormalizePath(null);
|
||||
}
|
||||
|
||||
[TestCase("Hawaii Five 0 S01 720p WEB DL DD5 1 H 264 NT", "Hawaii Five", 1)]
|
||||
[TestCase("30 Rock S03 WS PDTV XviD FUtV", "30 Rock", 3)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue