@Test(dataProvider = "positiveDownloadSpecProvider") public void testPositiveDownloadSpecFromString(String specFileName, String aql, String pattern, String target, String props, String recursive, String flat, String regexp, String build) throws IOException { SpecsHelper specsHelper = new SpecsHelper(new NullLog()); String specString = FileUtils.readFileToString(getFileFromResources("positiveTestSpecs/" + specFileName)); FileSpec spec = specsHelper.getSpecFromString(specString, downloadSpecValidator).getFiles()[0]; assertSpecParams(aql, pattern, target, props, recursive, flat, regexp, build, spec); }
public Spec getSpecFromString(String specStr, SpecsValidator specsValidator) throws IOException { ObjectMapper mapper = new ObjectMapper(); specStr = specStr.replace("\\", "\\\\"); Spec spec = mapper.readValue(specStr, Spec.class); specsValidator.validate(spec); pathToUnixFormat(spec); return spec; }
SpecsHelper { public Spec getSpecFromString(String specStr, SpecsValidator specsValidator) throws IOException { ObjectMapper mapper = new ObjectMapper(); specStr = specStr.replace("\\", "\\\\"); Spec spec = mapper.readValue(specStr, Spec.class); specsValidator.validate(spec); pathToUnixFormat(spec); return spec; } }
SpecsHelper { public Spec getSpecFromString(String specStr, SpecsValidator specsValidator) throws IOException { ObjectMapper mapper = new ObjectMapper(); specStr = specStr.replace("\\", "\\\\"); Spec spec = mapper.readValue(specStr, Spec.class); specsValidator.validate(spec); pathToUnixFormat(spec); return spec; } SpecsHelper(Log log); }
SpecsHelper { public Spec getSpecFromString(String specStr, SpecsValidator specsValidator) throws IOException { ObjectMapper mapper = new ObjectMapper(); specStr = specStr.replace("\\", "\\\\"); Spec spec = mapper.readValue(specStr, Spec.class); specsValidator.validate(spec); pathToUnixFormat(spec); return spec; } SpecsHelper(Log log); List<Artifact> uploadArtifactsBySpec(String uploadSpec, File workspace,
                                                Map<String, String> buildProperties,
                                                ArtifactoryBuildInfoClientBuilder clientBuilder); List<Artifact> uploadArtifactsBySpec(String uploadSpec, File workspace,
                                                Multimap<String, String> buildProperties,
                                                ArtifactoryBuildInfoClientBuilder clientBuilder); List<Artifact> uploadArtifactsBySpec(String uploadSpec, int numberOfThreads, File workspace,
                                                Multimap<String, String> buildProperties,
                                                ArtifactoryBuildInfoClientBuilder clientBuilder); static Multimap<K, V> createMultiMap(Map<K, V> input); List<Dependency> downloadArtifactsBySpec(String spec, ArtifactoryDependenciesClient client, String targetDirectory); Spec getSpecFromFile(File specFile, SpecsValidator specsValidator); Spec getSpecFromString(String specStr, SpecsValidator specsValidator); @SuppressWarnings("unused") boolean editPropertiesBySpec(String spec, ArtifactoryDependenciesClient client,
                                        EditPropertiesHelper.EditPropertiesActionType editType, String props); static ArrayListMultimap<String, String> getPropertiesMap(String props); static void fillPropertiesMap(String props, ArrayListMultimap<String, String> propertiesMap); }
SpecsHelper { public Spec getSpecFromString(String specStr, SpecsValidator specsValidator) throws IOException { ObjectMapper mapper = new ObjectMapper(); specStr = specStr.replace("\\", "\\\\"); Spec spec = mapper.readValue(specStr, Spec.class); specsValidator.validate(spec); pathToUnixFormat(spec); return spec; } SpecsHelper(Log log); List<Artifact> uploadArtifactsBySpec(String uploadSpec, File workspace,
                                                Map<String, String> buildProperties,
                                                ArtifactoryBuildInfoClientBuilder clientBuilder); List<Artifact> uploadArtifactsBySpec(String uploadSpec, File workspace,
                                                Multimap<String, String> buildProperties,
                                                ArtifactoryBuildInfoClientBuilder clientBuilder); List<Artifact> uploadArtifactsBySpec(String uploadSpec, int numberOfThreads, File workspace,
                                                Multimap<String, String> buildProperties,
                                                ArtifactoryBuildInfoClientBuilder clientBuilder); static Multimap<K, V> createMultiMap(Map<K, V> input); List<Dependency> downloadArtifactsBySpec(String spec, ArtifactoryDependenciesClient client, String targetDirectory); Spec getSpecFromFile(File specFile, SpecsValidator specsValidator); Spec getSpecFromString(String specStr, SpecsValidator specsValidator); @SuppressWarnings("unused") boolean editPropertiesBySpec(String spec, ArtifactoryDependenciesClient client,
                                        EditPropertiesHelper.EditPropertiesActionType editType, String props); static ArrayListMultimap<String, String> getPropertiesMap(String props); static void fillPropertiesMap(String props, ArrayListMultimap<String, String> propertiesMap);  }