fixed disk scan scheduler.

This commit is contained in:
kay.one 2013-05-12 19:52:55 -07:00
commit 687f8d9384
23 changed files with 140 additions and 142 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Messaging;
@ -38,6 +39,17 @@ namespace NzbDrone.Common.Test.EventingTests
_executorA.Verify(c => c.Execute(commandA), Times.Once());
}
[Test]
public void should_publish_command_by_with_optional_arg_with_name()
{
Mocker.GetMock<IServiceFactory>().Setup(c => c.GetImplementations(typeof(ICommand)))
.Returns(new List<Type> { typeof(CommandA), typeof(CommandB) });
Subject.PublishCommand(typeof(CommandA).FullName);
_executorA.Verify(c => c.Execute(It.IsAny<CommandA>()), Times.Once());
}
[Test]
public void should_not_publish_to_incompatible_executor()
{
@ -64,7 +76,10 @@ namespace NzbDrone.Common.Test.EventingTests
public class CommandA : ICommand
{
public CommandA(int id = 0)
{
}
}
public class CommandB : ICommand