mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 23:45:46 +02:00
fixed disk scan scheduler.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user