Search in sources :

Example 1 with ValidateFileAvailabilityJob

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);
}
Also used : ValidateFileAvailabilityJob(edu.unc.lib.boxc.deposit.validate.ValidateFileAvailabilityJob) URI(java.net.URI) File(java.io.File) Before(org.junit.Before)

Aggregations

ValidateFileAvailabilityJob (edu.unc.lib.boxc.deposit.validate.ValidateFileAvailabilityJob)1 File (java.io.File)1 URI (java.net.URI)1 Before (org.junit.Before)1