protected virtual ProtoExecutionResult ExecuteHooks(Message request)
        {
            var applicableTags   = GetApplicableTags(request);
            var mapper           = new ExecutionInfoMapper();
            var executionContext = mapper.ExecutionInfoFrom(GetExecutionInfo(request));

            return(MethodExecutor.ExecuteHooks(HookType, Strategy, applicableTags, executionContext));
        }
        protected virtual ProtoExecutionResult ExecuteHooks(Message request)
        {
            var applicableTags   = GetApplicableTags(request);
            var mapper           = new ExecutionInfoMapper();
            var executionContext = mapper.ExecutionInfoFrom(GetExecutionInfo(request));
            var res = MethodExecutor.ExecuteHooks(HookType, Strategy, applicableTags, executionContext);
            var allPendingMessages    = MethodExecutor.GetAllPendingMessages().Where(m => m != null);
            var allPendingScreenshots = MethodExecutor.GetAllPendingScreenshots().Select(ByteString.CopyFrom);

            res.Message.AddRange(allPendingMessages);
            res.Screenshots.AddRange(allPendingScreenshots);
            return(res);
        }
Exemplo n.º 3
0
        protected virtual ExecutionStatusResponse ExecuteHooks(ExecutionInfo info)
        {
            var applicableTags       = GetApplicableTags(info);
            var mapper               = new ExecutionInfoMapper();
            var executionContext     = mapper.ExecutionInfoFrom(info);
            var protoExecutionResult =
                ExecutionOrchestrator.ExecuteHooks(HookType, Strategy, applicableTags, executionContext);
            var allPendingMessages        = ExecutionOrchestrator.GetAllPendingMessages().Where(m => m != null);
            var allPendingScreenShotFiles = ExecutionOrchestrator.GetAllPendingScreenshotFiles();

            protoExecutionResult.Message.AddRange(allPendingMessages);
            protoExecutionResult.ScreenshotFiles.AddRange(allPendingScreenShotFiles);
            return(new ExecutionStatusResponse {
                ExecutionResult = protoExecutionResult
            });
        }