|
|
@ -14,31 +14,31 @@ using NzbDrone.Core.Music;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Test.Common;
|
|
|
|
using NzbDrone.Test.Common;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|
|
|
namespace NzbDrone.Core.Test.Housekeeping.Housekeepers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
[TestFixture]
|
|
|
|
public class DeleteBadMediaCoversFixture : CoreTest<DeleteBadMediaCovers>
|
|
|
|
public class DeleteBadMediaCoversFixture : CoreTest<DeleteBadMediaCovers>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private List<MetadataFile> _metadata;
|
|
|
|
private List<MetadataFile> _metadata;
|
|
|
|
private List<Artist> _artist;
|
|
|
|
private Dictionary<int, string> _artist;
|
|
|
|
|
|
|
|
|
|
|
|
[SetUp]
|
|
|
|
[SetUp]
|
|
|
|
public void Setup()
|
|
|
|
public void Setup()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_artist = Builder<Artist>.CreateListOfSize(1)
|
|
|
|
_artist = new Dictionary<int, string>
|
|
|
|
.All()
|
|
|
|
{
|
|
|
|
.With(c => c.Path = "C:\\Music\\".AsOsAgnostic())
|
|
|
|
{ 1, "C:\\Music\\".AsOsAgnostic() }
|
|
|
|
.Build().ToList();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
_metadata = Builder<MetadataFile>.CreateListOfSize(1)
|
|
|
|
_metadata = Builder<MetadataFile>.CreateListOfSize(1)
|
|
|
|
.Build().ToList();
|
|
|
|
.Build().ToList();
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IArtistService>()
|
|
|
|
Mocker.GetMock<IArtistService>()
|
|
|
|
.Setup(c => c.AllArtistPaths())
|
|
|
|
.Setup(c => c.AllArtistPaths())
|
|
|
|
.Returns(_artist.ToDictionary(x => x.Id, x => x.Path));
|
|
|
|
.Returns(_artist);
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IMetadataFileService>()
|
|
|
|
Mocker.GetMock<IMetadataFileService>()
|
|
|
|
.Setup(c => c.GetFilesByArtist(_artist.First().Id))
|
|
|
|
.Setup(c => c.GetFilesByArtist(_artist.First().Key))
|
|
|
|
.Returns(_metadata);
|
|
|
|
.Returns(_metadata);
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IConfigService>().SetupGet(c => c.CleanupMetadataImages).Returns(true);
|
|
|
|
Mocker.GetMock<IConfigService>().SetupGet(c => c.CleanupMetadataImages).Returns(true);
|