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

ShouldDispatchCommandWithoutParameters() private method

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

            command.Verify(x => x.Execute(It.Is<string[]>(y => !y.Any())));
        }