Sync DeleteBadMediaCoversFixture with upstream

(cherry picked from commit df6c89ea234526a61df65ccf344ac52d34b3c97a)

Closes #3990
pull/4016/head
Qstick 1 year ago committed by Bogdan
parent c88d64a9ac
commit ce62a12c62

@ -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);
Loading…
Cancel
Save