use of edu.harvard.iq.dataverse.DataFileServiceBean in project dataverse by IQSS.
the class UpdateDatasetThumbnailCommandTest method setUp.
@Before
public void setUp() {
dataset = new Dataset();
testEngine = new TestDataverseEngine(new TestCommandContext() {
@Override
public DataFileServiceBean files() {
return new DataFileServiceBean() {
@Override
public DataFile find(Object object) {
if (object == unfindableFile) {
return null;
} else if (object == thumbnailUnexpectedlyAbsent) {
return new DataFile();
} else {
return null;
}
}
};
}
@Override
public DatasetServiceBean datasets() {
return new DatasetServiceBean() {
@Override
public Dataset setDatasetFileAsThumbnail(Dataset dataset, DataFile datasetFileThumbnailToSwitchTo) {
return dataset;
}
};
}
@Override
public SystemConfig systemConfig() {
return new SystemConfig() {
@Override
public String getDataverseSiteUrl() {
return "https://dataverse.example.edu";
}
};
}
});
}
Aggregations