-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ab34a1
commit c0e8a3e
Showing
3 changed files
with
31 additions
and
21 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/NzbDrone.Core.Test/OrganizerTests/CleanFilenameFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using FluentAssertions; | ||
using NUnit.Framework; | ||
using NzbDrone.Core.Organizer; | ||
using NzbDrone.Core.Test.Framework; | ||
|
||
namespace NzbDrone.Core.Test.OrganizerTests | ||
{ | ||
[TestFixture] | ||
public class CleanFilenameFixture : CoreTest | ||
{ | ||
[TestCase("Law & Order: Criminal Intent - S10E07 - Icarus [HDTV-720p]", "Law & Order - Criminal Intent - S10E07 - Icarus [HDTV-720p]")] | ||
public void should_replaace_invalid_characters(string name, string expectedName) | ||
{ | ||
FileNameBuilder.CleanFileName(name).Should().Be(expectedName); | ||
} | ||
|
||
[TestCase(".hack s01e01", "hack s01e01")] | ||
public void should_remove_periods_from_start(string name, string expectedName) | ||
{ | ||
FileNameBuilder.CleanFileName(name).Should().Be(expectedName); | ||
} | ||
|
||
[TestCase(" Series Title - S01E01 - Episode Title", "Series Title - S01E01 - Episode Title")] | ||
[TestCase("Series Title - S01E01 - Episode Title ", "Series Title - S01E01 - Episode Title")] | ||
public void should_remove_spaces_from_start_and_end(string name, string expectedName) | ||
{ | ||
FileNameBuilder.CleanFileName(name).Should().Be(expectedName); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters