jellyfin/MediaBrowser.Tests/Resolvers/MusicResolverTests.cs
2014-08-26 23:25:39 -04:00

31 lines
1.4 KiB
C#

using MediaBrowser.Controller.Resolvers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MediaBrowser.Tests.Resolvers
{
[TestClass]
public class MusicResolverTests
{
[TestMethod]
public void TestMultiDiscAlbums()
{
Assert.IsFalse(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"blah blah"));
Assert.IsFalse(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"d:\\music\weezer\\03 Pinkerton"));
Assert.IsFalse(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"d:\\music\\michael jackson\\Bad (2012 Remaster)"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"cd1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disc1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disk1"));
// Add a space
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"cd 1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disc 1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disk 1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"cd - 1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disc- 1"));
Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disk - 1"));
}
}
}