mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
post grab notification and updates are now using the new EventAggregator
This commit is contained in:
parent
13658e3c6d
commit
554924a522
40 changed files with 670 additions and 482 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue