@Test public void toCollectionFileName_ShouldRemoveCountryCodes_WhenSourceRequiresIt() { com.decathlon.ara.domain.Source sourceWithCountries = new com.decathlon.ara.domain.Source() .withPostmanCountryRootFolders(true); assertThat(cut.toCollectionFileName(sourceWithCountries, "file.json")).isEqualTo("file.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_all.json")).isEqualTo("file.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_cn.json")).isEqualTo("file.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_be+cn.json")).isEqualTo("file.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_all+be+cn.json")).isEqualTo("file.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_a.json")).isEqualTo("file_a.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_alli.json")).isEqualTo("file_alli.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_AA.json")).isEqualTo("file_AA.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_a1.json")).isEqualTo("file_a1.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file_AA+bb.json")).isEqualTo("file_AA+bb.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file.postman_collection.json")).isEqualTo("file.postman_collection.json"); assertThat(cut.toCollectionFileName(sourceWithCountries, "file.postman_collection_all.json")).isEqualTo("file.postman_collection.json"); }
String toCollectionFileName(Source source, String newmanReportPath) { if (source.isPostmanCountryRootFolders()) { return newmanReportPath.replaceAll("_[a-z]{2,3}(\\+[a-z]{2,3})*.json$", ".json"); } return newmanReportPath; }
PostmanService { String toCollectionFileName(Source source, String newmanReportPath) { if (source.isPostmanCountryRootFolders()) { return newmanReportPath.replaceAll("_[a-z]{2,3}(\\+[a-z]{2,3})*.json$", ".json"); } return newmanReportPath; } }
PostmanService { String toCollectionFileName(Source source, String newmanReportPath) { if (source.isPostmanCountryRootFolders()) { return newmanReportPath.replaceAll("_[a-z]{2,3}(\\+[a-z]{2,3})*.json$", ".json"); } return newmanReportPath; }  }
PostmanService { String toCollectionFileName(Source source, String newmanReportPath) { if (source.isPostmanCountryRootFolders()) { return newmanReportPath.replaceAll("_[a-z]{2,3}(\\+[a-z]{2,3})*.json$", ".json"); } return newmanReportPath; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { String toCollectionFileName(Source source, String newmanReportPath) { if (source.isPostmanCountryRootFolders()) { return newmanReportPath.replaceAll("_[a-z]{2,3}(\\+[a-z]{2,3})*.json$", ".json"); } return newmanReportPath; }  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; }