@Test public void toStep_should_return_the_assertion_index() { NewmanScenario newmanScenario = new NewmanScenario() .withExecution(new Execution() .withAssertions(new Assertion[] { new Assertion("name0"), new Assertion("name1"), new Assertion("name2"), new Assertion("name3") })); final String step = cut.toStep(newmanScenario, 2); assertThat(step).isEqualTo("name2"); }
String toStep(NewmanScenario newmanScenario, int line) { if (line == LINE_PRE_REQUEST_SCRIPT) { return STEP_PRE_REQUEST_SCRIPT; } if (line == LINE_TEST_SCRIPT) { return STEP_TEST_SCRIPT; } Assertion[] assertions = newmanScenario.getExecution().getAssertions(); if (assertions != null && line >= 0 && assertions.length > line) { return assertions[line].getName(); } return buildRequestStep(newmanScenario.getItem().getRequest()); }
PostmanService { String toStep(NewmanScenario newmanScenario, int line) { if (line == LINE_PRE_REQUEST_SCRIPT) { return STEP_PRE_REQUEST_SCRIPT; } if (line == LINE_TEST_SCRIPT) { return STEP_TEST_SCRIPT; } Assertion[] assertions = newmanScenario.getExecution().getAssertions(); if (assertions != null && line >= 0 && assertions.length > line) { return assertions[line].getName(); } return buildRequestStep(newmanScenario.getItem().getRequest()); } }
PostmanService { String toStep(NewmanScenario newmanScenario, int line) { if (line == LINE_PRE_REQUEST_SCRIPT) { return STEP_PRE_REQUEST_SCRIPT; } if (line == LINE_TEST_SCRIPT) { return STEP_TEST_SCRIPT; } Assertion[] assertions = newmanScenario.getExecution().getAssertions(); if (assertions != null && line >= 0 && assertions.length > line) { return assertions[line].getName(); } return buildRequestStep(newmanScenario.getItem().getRequest()); }  }
PostmanService { String toStep(NewmanScenario newmanScenario, int line) { if (line == LINE_PRE_REQUEST_SCRIPT) { return STEP_PRE_REQUEST_SCRIPT; } if (line == LINE_TEST_SCRIPT) { return STEP_TEST_SCRIPT; } Assertion[] assertions = newmanScenario.getExecution().getAssertions(); if (assertions != null && line >= 0 && assertions.length > line) { return assertions[line].getName(); } return buildRequestStep(newmanScenario.getItem().getRequest()); }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { String toStep(NewmanScenario newmanScenario, int line) { if (line == LINE_PRE_REQUEST_SCRIPT) { return STEP_PRE_REQUEST_SCRIPT; } if (line == LINE_TEST_SCRIPT) { return STEP_TEST_SCRIPT; } Assertion[] assertions = newmanScenario.getExecution().getAssertions(); if (assertions != null && line >= 0 && assertions.length > line) { return assertions[line].getName(); } return buildRequestStep(newmanScenario.getItem().getRequest()); }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }