public void RerunBlockedCommand_CommandIsNewThusNotBlocked_ThrowException()
{
bool wasThrown = false;
Exception thrownException = null;
var fakeFilterManager = A.Fake<IFilterManager>();
A.CallTo(() => fakeFilterManager.Process(A<CommandBase>.Ignored)).Returns(true);
var processor = new CommandProcessor(null, fakeFilterManager);
var command = new TestCommand(CommandState.New);
try
{
processor.RerunBlockedCommand(command);
}
catch (CommandProcessorException ex)
{
thrownException = ex;
wasThrown = true;
}
Assert.IsTrue(wasThrown);
Assert.AreEqual("Command is not blocked", thrownException.Message);
}