New: Various Healthcheck enhancements

Various pulls from Radarr;  Completed at the file - not commit - level
This commit is contained in:
bakerboy448
2022-01-19 12:47:38 -06:00
committed by GitHub
parent c5787b0c87
commit 24e2ff56dd
32 changed files with 201 additions and 97 deletions
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.Download;
using NzbDrone.Core.HealthCheck.Checks;
using NzbDrone.Core.Localization;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.HealthCheck.Checks
@@ -10,12 +12,20 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
[TestFixture]
public class DownloadClientCheckFixture : CoreTest<DownloadClientCheck>
{
[SetUp]
public void Setup()
{
Mocker.GetMock<ILocalizationService>()
.Setup(s => s.GetLocalizedString(It.IsAny<string>()))
.Returns("Some Warning Message");
}
[Test]
public void should_return_warning_when_download_client_has_not_been_configured()
{
Mocker.GetMock<IProvideDownloadClient>()
.Setup(s => s.GetDownloadClients())
.Returns(new IDownloadClient[0]);
.Returns(Array.Empty<IDownloadClient>());
Subject.Check().ShouldBeWarning();
}