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

ShouldDispatchAliasCommandWithParameter() private method

private ShouldDispatchAliasCommandWithParameter ( string commandArgument, string alias, string commandParameter, [ typeNameMatcher, [ aliasMatcher, [ kernel, Mock command, CommandDispatcher commandDispatcher ) : void
commandArgument string
alias string
commandParameter string
typeNameMatcher [
aliasMatcher [
kernel [
command Mock
commandDispatcher CommandDispatcher
return void
        public void ShouldDispatchAliasCommandWithParameter(
			string commandArgument,
			string alias,
			string commandParameter,
			[Frozen]Mock<ITypeNameMatcher> typeNameMatcher,
			[Frozen]Mock<IAliasMatcher> aliasMatcher,
			[Frozen]Mock<IKernel> kernel,
			Mock<FooCommand> command,
			CommandDispatcher commandDispatcher)
        {
            typeNameMatcher.Setup(x => x.IsSatisfiedBy(It.IsAny<string>())).Returns(false);
            aliasMatcher.Setup(x => x.IsSatisfiedBy(alias)).Returns(true);

            aliasMatcher.Setup(x => x.GetMatchedType(alias)).Returns(FooCommandType);
            kernel.Setup(x => x.Resolve(FooCommandType)).Returns(command.Object);

            commandDispatcher.Dispatch(new string[] { alias, commandParameter });

            command.Verify(x => x.Execute(It.Is<string[]>(y => y.Length == 1 && y.Any(z => z == commandParameter))));
        }