mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Fix Tests for Artist First Letter
This commit is contained in:
parent
ec41951ea5
commit
04b85071e3
1 changed files with 7 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FizzWare.NBuilder;
|
using FizzWare.NBuilder;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
@ -33,15 +34,15 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
.Returns<Quality>(v => Quality.DefaultQualityDefinitions.First(c => c.Quality == v));
|
.Returns<Quality>(v => Quality.DefaultQualityDefinitions.First(c => c.Quality == v));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("The Mist", "M\\The Mist")]
|
[TestCase("The Mist", "M", "The Mist")]
|
||||||
[TestCase("A", "A\\A")]
|
[TestCase("A", "A", "A")]
|
||||||
[TestCase("30 Rock", "3\\30 Rock")]
|
[TestCase("30 Rock", "3", "30 Rock")]
|
||||||
public void should_get_expected_folder_name_back(string title, string expected)
|
public void should_get_expected_folder_name_back(string title, string parent, string child)
|
||||||
{
|
{
|
||||||
_artist.Name = title;
|
_artist.Name = title;
|
||||||
_namingConfig.ArtistFolderFormat = "{Artist NameFirstCharacter}\\{Artist Name}";
|
_namingConfig.ArtistFolderFormat = "{Artist NameFirstCharacter}\\{Artist Name}";
|
||||||
|
|
||||||
Subject.GetArtistFolder(_artist).Should().Be(expected);
|
Subject.GetArtistFolder(_artist).Should().Be(Path.Combine(parent, child));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -50,7 +51,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
_artist.Name = "Westworld";
|
_artist.Name = "Westworld";
|
||||||
_namingConfig.ArtistFolderFormat = "{artist namefirstcharacter}\\{artist name}";
|
_namingConfig.ArtistFolderFormat = "{artist namefirstcharacter}\\{artist name}";
|
||||||
|
|
||||||
Subject.GetArtistFolder(_artist).Should().Be("w\\westworld");
|
Subject.GetArtistFolder(_artist).Should().Be(Path.Combine("w", "westworld"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue