Curation extends DSpaceRunnable<CurationScriptConfiguration> { @Override public CurationScriptConfiguration getScriptConfiguration() { return new DSpace().getServiceManager().getServiceByName("curate", CurationScriptConfiguration.class); }  @Override void internalRun(); @Override void printHelp(); @Override CurationScriptConfiguration getScriptConfiguration(); @Override void setup();  }
@Test(expected = ParseException.class) public void curationWithoutEPersonParameterTest() throws Exception { context.turnOffAuthorisationSystem(); Community community = CommunityBuilder.createCommunity(context) .build(); Collection collection = CollectionBuilder.createCollection(context, community) .build(); context.restoreAuthSystemState(); String[] args = new String[] {"curate", "-t", CurationClientOptions.getTaskOptions().get(0), "-i", collection.getHandle()}; TestDSpaceRunnableHandler testDSpaceRunnableHandler = new TestDSpaceRunnableHandler(); ScriptService scriptService = ScriptServiceFactory.getInstance().getScriptService(); ScriptConfiguration scriptConfiguration = scriptService.getScriptConfiguration(args[0]); DSpaceRunnable script = null; if (scriptConfiguration != null) { script = scriptService.createDSpaceRunnableForScriptConfiguration(scriptConfiguration); } if (script != null) { script.initialize(args, testDSpaceRunnableHandler, null); script.run(); } }
@Test public void curationWithEPersonParameterTest() throws Exception { context.turnOffAuthorisationSystem(); Community community = CommunityBuilder.createCommunity(context) .build(); Collection collection = CollectionBuilder.createCollection(context, community) .build(); context.restoreAuthSystemState(); String[] args = new String[] {"curate", "-e", "admin@email.com", "-t", CurationClientOptions.getTaskOptions().get(0), "-i", collection.getHandle()}; TestDSpaceRunnableHandler testDSpaceRunnableHandler = new TestDSpaceRunnableHandler(); ScriptService scriptService = ScriptServiceFactory.getInstance().getScriptService(); ScriptConfiguration scriptConfiguration = scriptService.getScriptConfiguration(args[0]); DSpaceRunnable script = null; if (scriptConfiguration != null) { script = scriptService.createDSpaceRunnableForScriptConfiguration(scriptConfiguration); } if (script != null) { script.initialize(args, testDSpaceRunnableHandler, null); script.run(); } }