Exemple #1
0
        public async Task ExecuteAndReturn_ExecutePipelineAndPassCommandInContext()
        {
            var session = CreateSession();

            var(command, _) = CommandHandlerMock.GetCommand();

            await session.ExecuteCommand(command);

            CatchCommandPipelineStep.AssertCommandContextCaptured <CommandMock>(
                context => context.Command.Id == command.Id);
        }
Exemple #2
0
        public async Task ExecuteAndReturn_ExecutePipelineAndPassConnectionInContext()
        {
            var session = CreateSession();

            var(command, _) = CommandHandlerMock.GetCommand();

            await session.ExecuteCommand(command);

            CatchCommandPipelineStep.AssertCommandContextCaptured <CommandMock>(
                // ReSharper disable once IsExpressionAlwaysTrue
                context => context.Connection is HattemSessionMock);
        }