mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
external notifications are now based on Events.
This commit is contained in:
@@ -7,10 +7,10 @@ using FluentAssertions;
|
||||
using NCrunch.Framework;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.ExternalNotification;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Jobs;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Providers.ExternalNotification;
|
||||
using NzbDrone.Core.Providers.Metadata;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
@@ -115,12 +115,6 @@ namespace NzbDrone.Core.Test
|
||||
kernel.Resolve<IIndexerService>().All().Select(c => c.Type).Should().BeEquivalentTo(indexers);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void externalNotifiers_are_initialized()
|
||||
{
|
||||
kernel.Resolve<ExternalNotificationProvider>().All().Should().HaveSameCount(extNotifications);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void metadata_clients_are_initialized()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.ExternalNotification;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers;
|
||||
@@ -117,16 +118,9 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
.Setup(s => s.FileExists(currentFilename))
|
||||
.Returns(true);
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
.Setup(e => e.OnDownload("30 Rock - 1x01 - [WEBDL]", It.IsAny<Series>()));
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<DiskScanProvider>().MoveEpisodeFile(file, true);
|
||||
|
||||
//Assert
|
||||
result.Should().NotBeNull();
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
.Verify(e => e.OnDownload("30 Rock - 1x01 - [WEBDL]", It.IsAny<Series>()), Times.Once());
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -172,13 +166,8 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
.Setup(e => e.CalculateFilePath(It.IsAny<Series>(), fakeEpisode.First().SeasonNumber, filename, ".mkv"))
|
||||
.Returns(fi);
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
.Setup(e => e.OnDownload("30 Rock - 1x01 - [WEBDL]", It.IsAny<Series>()));
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<DiskScanProvider>().MoveEpisodeFile(file, true);
|
||||
|
||||
//Assert
|
||||
result.Should().BeNull();
|
||||
ExceptionVerification.ExpectedErrors(1);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.ExternalNotification;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
||||
@@ -11,6 +11,7 @@ using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.ExternalNotification;
|
||||
using NzbDrone.Core.Model.Xbmc;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
|
||||
Reference in New Issue
Block a user