Example #1
0
        public void Should_return_false_if_destination_does_not_contain_command_name( )
        {
            IHttpGateway mockRequest       = _mockery.DynamicMock <IHttpGateway>( );
            string       firstCommandName  = "test.marina";
            string       secondCommandName = "test2.marina";

            using (_mockery.Record( )) {
                SetupResult.For(mockRequest.Destination( )).Return(secondCommandName);
            }
            using (_mockery.Playback( )) {
                Assert.IsFalse(CreateSUT(firstCommandName).IsSatisfiedBy(mockRequest));
            }
        }
Example #2
0
        public void Should_return_true_if_destination_contains_command_name( )
        {
            IHttpGateway mockRequest = _mockery.DynamicMock <IHttpGateway>( );
            string       commandName = "test.marina";

            using (_mockery.Record( )) {
                SetupResult.For(mockRequest.Destination( )).Return(commandName);
            }

            using (_mockery.Playback( )) {
                Assert.IsTrue(CreateSUT(commandName).IsSatisfiedBy(mockRequest));
            }
        }