@Test public void getStatus_should_return_passed_when_null_failure_list() { final String status = cut.getStatus(null, 5, false); assertThat(status).isEqualTo("passed"); }
String getStatus(List<Failure> failures, int requestedLine, boolean skipped) { if (skipped) { return Status.SKIPPED.getJsonValue(); } if (failures != null) { for (Failure failure : failures) { if (toErrorLine(failure) == requestedLine) { return Status.FAILED.getJsonValue(); } } } return Status.PASSED.getJsonValue(); }
PostmanService { String getStatus(List<Failure> failures, int requestedLine, boolean skipped) { if (skipped) { return Status.SKIPPED.getJsonValue(); } if (failures != null) { for (Failure failure : failures) { if (toErrorLine(failure) == requestedLine) { return Status.FAILED.getJsonValue(); } } } return Status.PASSED.getJsonValue(); } }
PostmanService { String getStatus(List<Failure> failures, int requestedLine, boolean skipped) { if (skipped) { return Status.SKIPPED.getJsonValue(); } if (failures != null) { for (Failure failure : failures) { if (toErrorLine(failure) == requestedLine) { return Status.FAILED.getJsonValue(); } } } return Status.PASSED.getJsonValue(); }  }
PostmanService { String getStatus(List<Failure> failures, int requestedLine, boolean skipped) { if (skipped) { return Status.SKIPPED.getJsonValue(); } if (failures != null) { for (Failure failure : failures) { if (toErrorLine(failure) == requestedLine) { return Status.FAILED.getJsonValue(); } } } return Status.PASSED.getJsonValue(); }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { String getStatus(List<Failure> failures, int requestedLine, boolean skipped) { if (skipped) { return Status.SKIPPED.getJsonValue(); } if (failures != null) { for (Failure failure : failures) { if (toErrorLine(failure) == requestedLine) { return Status.FAILED.getJsonValue(); } } } return Status.PASSED.getJsonValue(); }  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; }