@Test public void testHandleRequest(){ JsonElement jsonElement = new JsonPrimitive("DataConversions-Env-Stability"); BentenHandlerResponse bentenHandlerResponse = jenkinsJobDetailsByJobNameActionHandler.handle(JenkinsMessageBuilder.constructBentenMessageForJobName(jsonElement)); Assert.assertNotNull(bentenHandlerResponse.getBentenSlackResponse()); }
public BentenHandlerResponse handle(BentenMessage bentenMessage) { String jobName = BentenMessageHelper.getParameterAsString(bentenMessage,JenkinsActionParameters.PARAMETER_JOB_JOBNAME); JobWithDetails jobWithDetails = bentenJenkinsClient.getJobByJobName(jobName); BentenHandlerResponse bentenHandlerResponse = new BentenHandlerResponse(); bentenHandlerResponse.setBentenSlackResponse(SlackJenkinsMessageRenderer.renderJobDetailByJobName(jobWithDetails)); return bentenHandlerResponse; }
JenkinsJobDetailsByJobNameActionHandler implements BentenActionHandler { public BentenHandlerResponse handle(BentenMessage bentenMessage) { String jobName = BentenMessageHelper.getParameterAsString(bentenMessage,JenkinsActionParameters.PARAMETER_JOB_JOBNAME); JobWithDetails jobWithDetails = bentenJenkinsClient.getJobByJobName(jobName); BentenHandlerResponse bentenHandlerResponse = new BentenHandlerResponse(); bentenHandlerResponse.setBentenSlackResponse(SlackJenkinsMessageRenderer.renderJobDetailByJobName(jobWithDetails)); return bentenHandlerResponse; } }
JenkinsJobDetailsByJobNameActionHandler implements BentenActionHandler { public BentenHandlerResponse handle(BentenMessage bentenMessage) { String jobName = BentenMessageHelper.getParameterAsString(bentenMessage,JenkinsActionParameters.PARAMETER_JOB_JOBNAME); JobWithDetails jobWithDetails = bentenJenkinsClient.getJobByJobName(jobName); BentenHandlerResponse bentenHandlerResponse = new BentenHandlerResponse(); bentenHandlerResponse.setBentenSlackResponse(SlackJenkinsMessageRenderer.renderJobDetailByJobName(jobWithDetails)); return bentenHandlerResponse; }  }
JenkinsJobDetailsByJobNameActionHandler implements BentenActionHandler { public BentenHandlerResponse handle(BentenMessage bentenMessage) { String jobName = BentenMessageHelper.getParameterAsString(bentenMessage,JenkinsActionParameters.PARAMETER_JOB_JOBNAME); JobWithDetails jobWithDetails = bentenJenkinsClient.getJobByJobName(jobName); BentenHandlerResponse bentenHandlerResponse = new BentenHandlerResponse(); bentenHandlerResponse.setBentenSlackResponse(SlackJenkinsMessageRenderer.renderJobDetailByJobName(jobWithDetails)); return bentenHandlerResponse; }  BentenHandlerResponse handle(BentenMessage bentenMessage); }
JenkinsJobDetailsByJobNameActionHandler implements BentenActionHandler { public BentenHandlerResponse handle(BentenMessage bentenMessage) { String jobName = BentenMessageHelper.getParameterAsString(bentenMessage,JenkinsActionParameters.PARAMETER_JOB_JOBNAME); JobWithDetails jobWithDetails = bentenJenkinsClient.getJobByJobName(jobName); BentenHandlerResponse bentenHandlerResponse = new BentenHandlerResponse(); bentenHandlerResponse.setBentenSlackResponse(SlackJenkinsMessageRenderer.renderJobDetailByJobName(jobWithDetails)); return bentenHandlerResponse; }  BentenHandlerResponse handle(BentenMessage bentenMessage);  }