AppHarbor.Tests.CommandDispatcherTest.ShouldDispatchCommandWithParameter C# (CSharp) Method

ShouldDispatchCommandWithParameter() private method

private ShouldDispatchCommandWithParameter ( string commandArgument, string scope, string commandName, string commandParameter, [ typeNameMatcher, [ kernel, Mock command, CommandDispatcher commandDispatcher ) : void
commandArgument string
scope string
commandName string
commandParameter string
typeNameMatcher [
kernel [
command Mock
commandDispatcher CommandDispatcher
return void
        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))));
        }