use of org.jfrog.build.api.util.NullLog in project build-info by JFrogDev.
the class SpecsHelperTest method testGetUploadDownloadSpecFromStringPositiveCases.
/**
* Tests positive scenarios of parsing a String to FileSpec object.
*/
@Test(dataProvider = "fileSpecWithValues")
public void testGetUploadDownloadSpecFromStringPositiveCases(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.getDownloadUploadSpec(specString, new UploadSpecValidator()).getFiles()[0];
assertSpecParams(aql, pattern, target, props, recursive, flat, regexp, build, spec);
}
use of org.jfrog.build.api.util.NullLog in project build-info by JFrogDev.
the class SpecsHelperTest method testGetUploadDownloadSpecFromFilePositiveCases.
/**
* Tests positive scenarios of parsing a File to FileSpec object.
*/
@Test(dataProvider = "fileSpecWithValues")
public void testGetUploadDownloadSpecFromFilePositiveCases(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());
File fileSpec = getFileFromResources("positiveTestSpecs/" + specFileName);
FileSpec spec = specsHelper.getDownloadUploadSpec(fileSpec, new UploadSpecValidator()).getFiles()[0];
assertSpecParams(aql, pattern, target, props, recursive, flat, regexp, build, spec);
}
use of org.jfrog.build.api.util.NullLog in project build-info by JFrogDev.
the class SpecsHelperTest method testGetUploadDownloadSpecFromStringNegativeCases.
/**
* Tests negative scenarios of parsing a String to FileSpec object.
*/
@Test(dataProvider = "corruptedStringSpecs", expectedExceptions = { JsonMappingException.class, IllegalArgumentException.class })
public void testGetUploadDownloadSpecFromStringNegativeCases(String spec) throws IOException {
SpecsHelper specsHelper = new SpecsHelper(new NullLog());
specsHelper.getDownloadUploadSpec(spec, new UploadSpecValidator());
}
use of org.jfrog.build.api.util.NullLog in project build-info by JFrogDev.
the class SpecsHelperTest method testGetUploadDownloadSpecFromFileNegativeCases.
/**
* Tests negative scenarios of parsing a File to FileSpec object.
*/
@Test(dataProvider = "corruptedFileSpecs", expectedExceptions = { JsonMappingException.class, IllegalArgumentException.class })
public void testGetUploadDownloadSpecFromFileNegativeCases(String specFileName) throws IOException {
SpecsHelper specsHelper = new SpecsHelper(new NullLog());
File fileSpec = getFileFromResources("negativeTestSpecs/" + specFileName);
specsHelper.getDownloadUploadSpec(fileSpec, new UploadSpecValidator());
}
Aggregations