added test for command executed event

This commit is contained in:
kay.one
2013-09-14 16:34:21 -07:00
parent e2e787261d
commit 634cc32ad8
8 changed files with 36 additions and 12 deletions
-1
View File
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging;
using NzbDrone.Core.Messaging.Events;
@@ -118,12 +118,13 @@ namespace NzbDrone.Core.Messaging.Commands
}
finally
{
_eventAggregator.PublishEvent(new CommandUpdatedEvent(command));
_eventAggregator.PublishEvent(new CommandExecutedEvent(command));
if (MappedDiagnosticsContext.Get("CommandId") == command.Id.ToString())
{
MappedDiagnosticsContext.Remove("CommandId");
}
_eventAggregator.PublishEvent(new CommandUpdatedEvent(command));
_eventAggregator.PublishEvent(new CommandExecutedEvent(command));
}
_logger.Trace("{0} <- {1} [{2}]", command.GetType().Name, handler.GetType().Name, command.Runtime.ToString(""));