use of edu.unc.lib.boxc.deposit.validate.ValidateFileAvailabilityJob in project box-c by UNC-Libraries.
the class ValidateFileAvailabilityJobTest method init.
@Before
public void init() throws Exception {
job = new ValidateFileAvailabilityJob();
job.setJobUUID(jobUUID);
job.setDepositUUID(depositUUID);
job.setDepositDirectory(depositDir);
setField(job, "pidMinter", pidMinter);
job.setIngestSourceManager(sourceManager);
setField(job, "depositModelManager", depositModelManager);
setField(job, "depositsDirectory", depositsDirectory);
setField(job, "depositStatusFactory", depositStatusFactory);
setField(job, "jobStatusFactory", jobStatusFactory);
job.init();
when(sourceManager.getIngestSourceForUri(any(URI.class))).thenReturn(ingestSource);
when(ingestSource.exists(any(URI.class))).thenReturn(true);
depositPid = job.getDepositPID();
File examplesFile = new File("src/test/resources/examples");
FileUtils.copyDirectory(examplesFile, depositDir);
}
Aggregations