DS-3851 partially remove legacy workflow to simplify testing

First tests for the workflow endpoint
This commit is contained in:
Andrea Bollini
2019-02-20 23:11:04 +01:00
parent d3d3b57133
commit 70091e59b8
27 changed files with 1057 additions and 244 deletions

View File

@@ -509,8 +509,9 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
Group g = groupService.create(context);
context.restoreAuthSystemState();
collection.setWorkflowGroup(context, step, g);
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(collection, step), notNullValue());
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(collection, step), equalTo(g));
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(context, collection, step),
notNullValue());
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(context, collection, step), equalTo(g));
}
/**
@@ -528,8 +529,10 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
context.restoreAuthSystemState();
collection.setWorkflowGroup(context, step, g1);
collection.setWorkflowGroup(context, step, g2);
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(collection, step), notNullValue());
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(collection, step), equalTo(g2));
assertThat("testSetWorkflowGroup 0", collectionService.getWorkflowGroup(context, collection, step),
notNullValue());
assertThat("testSetWorkflowGroup 1", collectionService.getWorkflowGroup(context, collection, step),
equalTo(g2));
}
/**
@@ -539,7 +542,8 @@ public class CollectionTest extends AbstractDSpaceObjectTest {
public void testGetWorkflowGroup() {
//null by default
int step = 1;
assertThat("testGetWorkflowGroup 0", collectionService.getWorkflowGroup(collection, step), nullValue());
assertThat("testGetWorkflowGroup 0", collectionService.getWorkflowGroup(context, collection, step),
nullValue());
}
/**