mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
post grab notification and updates are now using the new EventAggregator
This commit is contained in:
@@ -5,6 +5,7 @@ using Moq;
|
||||
using NLog;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Eventing;
|
||||
using NzbDrone.Test.Common.AutoMoq;
|
||||
|
||||
namespace NzbDrone.Test.Common
|
||||
@@ -99,5 +100,15 @@ namespace NzbDrone.Test.Common
|
||||
{
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), "Files", fileName);
|
||||
}
|
||||
|
||||
protected void VerifyEventPublished<TEvent>(TEvent message) where TEvent : IEvent
|
||||
{
|
||||
Mocker.GetMock<IEventAggregator>().Verify(c => c.Publish(message), Times.Once());
|
||||
}
|
||||
|
||||
protected void VerifyEventNotPublished<TEvent>() where TEvent : IEvent
|
||||
{
|
||||
Mocker.GetMock<IEventAggregator>().Verify(c => c.Publish(It.IsAny<TEvent>()), Times.Never());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user