|
|
@ -5,6 +5,7 @@ using Moq;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using NzbDrone.Common.Disk;
|
|
|
|
using NzbDrone.Common.Disk;
|
|
|
|
using NzbDrone.Core.HealthCheck.Checks;
|
|
|
|
using NzbDrone.Core.HealthCheck.Checks;
|
|
|
|
|
|
|
|
using NzbDrone.Core.ImportLists;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Core.Music;
|
|
|
|
using NzbDrone.Core.Music;
|
|
|
|
|
|
|
|
|
|
|
@ -19,10 +20,18 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|
|
|
.Build()
|
|
|
|
.Build()
|
|
|
|
.ToList();
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var importList = Builder<ImportListDefinition>.CreateListOfSize(1)
|
|
|
|
|
|
|
|
.Build()
|
|
|
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IArtistService>()
|
|
|
|
Mocker.GetMock<IArtistService>()
|
|
|
|
.Setup(s => s.GetAllArtists())
|
|
|
|
.Setup(s => s.GetAllArtists())
|
|
|
|
.Returns(artist);
|
|
|
|
.Returns(artist);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImportListFactory>()
|
|
|
|
|
|
|
|
.Setup(s => s.All())
|
|
|
|
|
|
|
|
.Returns(importList);
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IDiskProvider>()
|
|
|
|
Mocker.GetMock<IDiskProvider>()
|
|
|
|
.Setup(s => s.GetParentFolder(artist.First().Path))
|
|
|
|
.Setup(s => s.GetParentFolder(artist.First().Path))
|
|
|
|
.Returns(@"C:\Music");
|
|
|
|
.Returns(@"C:\Music");
|
|
|
@ -39,6 +48,10 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|
|
|
.Setup(s => s.GetAllArtists())
|
|
|
|
.Setup(s => s.GetAllArtists())
|
|
|
|
.Returns(new List<Artist>());
|
|
|
|
.Returns(new List<Artist>());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IImportListFactory>()
|
|
|
|
|
|
|
|
.Setup(s => s.All())
|
|
|
|
|
|
|
|
.Returns(new List<ImportListDefinition>());
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Check().ShouldBeOk();
|
|
|
|
Subject.Check().ShouldBeOk();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|