mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
fixed disk scan scheduler.
This commit is contained in:
parent
42849d3276
commit
687f8d9384
23 changed files with 140 additions and 142 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue