mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-16 21:16:24 -04:00
New: Add/remove individual albums
This commit is contained in:
@@ -15,7 +15,6 @@ using NzbDrone.Core.MetadataSource.SkyHook.Resource;
|
||||
namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
||||
{
|
||||
[TestFixture]
|
||||
[IntegrationTest]
|
||||
public class SkyHookProxyFixture : CoreTest<SkyHookProxy>
|
||||
{
|
||||
private MetadataProfile _metadataProfile;
|
||||
|
||||
@@ -3,16 +3,15 @@ using NUnit.Framework;
|
||||
using NzbDrone.Core.MetadataSource.SkyHook;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Test.Common.Categories;
|
||||
using Moq;
|
||||
using NzbDrone.Core.Profiles.Metadata;
|
||||
using NzbDrone.Core.Music;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
||||
{
|
||||
[TestFixture]
|
||||
[IntegrationTest]
|
||||
public class SkyHookProxySearchFixture : CoreTest<SkyHookProxy>
|
||||
{
|
||||
[SetUp]
|
||||
@@ -107,5 +106,28 @@ namespace NzbDrone.Core.Test.MetadataSource.SkyHook
|
||||
|
||||
ExceptionVerification.IgnoreWarns();
|
||||
}
|
||||
|
||||
[TestCase("Eminem", 0, typeof(Artist), "Eminem")]
|
||||
[TestCase("Eminem Kamikaze", 0, typeof(Artist), "Eminem")]
|
||||
[TestCase("Eminem Kamikaze", 1, typeof(Album), "Kamikaze")]
|
||||
public void successful_combined_search(string query, int position, Type resultType, string expected)
|
||||
{
|
||||
var result = Subject.SearchForNewEntity(query);
|
||||
result.Should().NotBeEmpty();
|
||||
result[position].GetType().Should().Be(resultType);
|
||||
|
||||
if (resultType == typeof(Artist))
|
||||
{
|
||||
var cast = result[position] as Artist;
|
||||
cast.Should().NotBeNull();
|
||||
cast.Name.Should().Be(expected);
|
||||
}
|
||||
else
|
||||
{
|
||||
var cast = result[position] as Album;
|
||||
cast.Should().NotBeNull();
|
||||
cast.Title.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user