public void ShouldDispatchCommandWithParameter(
string commandArgument,
string scope,
string commandName,
string commandParameter,
[Frozen]Mock<ITypeNameMatcher> typeNameMatcher,
[Frozen]Mock<IKernel> kernel,
Mock<FooCommand> command,
CommandDispatcher commandDispatcher)
{
typeNameMatcher.Setup(x => x.IsSatisfiedBy(commandArgument)).Returns(true);
typeNameMatcher.Setup(x => x.GetMatchedType(commandArgument)).Returns(FooCommandType);
kernel.Setup(x => x.Resolve(FooCommandType)).Returns(command.Object);
commandDispatcher.Dispatch(new string[] { scope, commandName, commandParameter });
command.Verify(x => x.Execute(It.Is<string[]>(y => y.Length == 1 && y.Any(z => z == commandParameter))));
}