@Test public void toErrorLine_should_return_request_line_for_null_error_index() { Failure failure = new Failure().withError(new com.decathlon.ara.scenario.postman.bean.Error()); final int line = cut.toErrorLine(failure); assertThat(line).isEqualTo(-1); }
int toErrorLine(Failure failure) { if (Failure.AT_PRE_REQUEST_SCRIPT.equals(failure.getAt())) { return LINE_PRE_REQUEST_SCRIPT; } if (Failure.AT_TEST_SCRIPT.equals(failure.getAt())) { return LINE_TEST_SCRIPT; } return (failure.getError().getIndex() == null ? REQUEST_LINE : failure.getError().getIndex().intValue()); }
PostmanService { int toErrorLine(Failure failure) { if (Failure.AT_PRE_REQUEST_SCRIPT.equals(failure.getAt())) { return LINE_PRE_REQUEST_SCRIPT; } if (Failure.AT_TEST_SCRIPT.equals(failure.getAt())) { return LINE_TEST_SCRIPT; } return (failure.getError().getIndex() == null ? REQUEST_LINE : failure.getError().getIndex().intValue()); } }
PostmanService { int toErrorLine(Failure failure) { if (Failure.AT_PRE_REQUEST_SCRIPT.equals(failure.getAt())) { return LINE_PRE_REQUEST_SCRIPT; } if (Failure.AT_TEST_SCRIPT.equals(failure.getAt())) { return LINE_TEST_SCRIPT; } return (failure.getError().getIndex() == null ? REQUEST_LINE : failure.getError().getIndex().intValue()); }  }
PostmanService { int toErrorLine(Failure failure) { if (Failure.AT_PRE_REQUEST_SCRIPT.equals(failure.getAt())) { return LINE_PRE_REQUEST_SCRIPT; } if (Failure.AT_TEST_SCRIPT.equals(failure.getAt())) { return LINE_TEST_SCRIPT; } return (failure.getError().getIndex() == null ? REQUEST_LINE : failure.getError().getIndex().intValue()); }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { int toErrorLine(Failure failure) { if (Failure.AT_PRE_REQUEST_SCRIPT.equals(failure.getAt())) { return LINE_PRE_REQUEST_SCRIPT; } if (Failure.AT_TEST_SCRIPT.equals(failure.getAt())) { return LINE_TEST_SCRIPT; } return (failure.getError().getIndex() == null ? REQUEST_LINE : failure.getError().getIndex().intValue()); }  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; }