added test for command executed event

This commit is contained in:
kay.one 2013-09-14 16:34:21 -07:00
commit 634cc32ad8
8 changed files with 36 additions and 12 deletions

View file

@ -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(""));