mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 14:33:09 +00:00
[CST-5755] removed Gson usage and small code refactoring
This commit is contained in:
@@ -564,7 +564,7 @@ public class ScriptRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
try {
|
try {
|
||||||
getClient(token).perform(post("/api/system/scripts/mock-script/processes")
|
getClient(token).perform(post("/api/system/scripts/mock-script/processes")
|
||||||
.contentType("multipart/form-data")
|
.contentType("multipart/form-data")
|
||||||
.param("properties", new Gson().toJson(list)))
|
.param("properties", new ObjectMapper().writeValueAsString(list)))
|
||||||
.andExpect(status().isAccepted())
|
.andExpect(status().isAccepted())
|
||||||
.andExpect(jsonPath("$", is(ProcessMatcher.matchProcess("mock-script",
|
.andExpect(jsonPath("$", is(ProcessMatcher.matchProcess("mock-script",
|
||||||
String.valueOf(admin.getID()),
|
String.valueOf(admin.getID()),
|
||||||
@@ -573,12 +573,12 @@ public class ScriptRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
|
|
||||||
Process process = processService.find(context, idRef.get());
|
Process process = processService.find(context, idRef.get());
|
||||||
List<Group> groups = process.getGroups();
|
List<Group> groups = process.getGroups();
|
||||||
boolean isPresent = false;
|
boolean isPresent = groups.stream().anyMatch(g -> g.getID().equals(specialGroup.getID()));
|
||||||
for (Group group : groups) {
|
// for (Group group : groups) {
|
||||||
if (group.getID().equals(specialGroup.getID())) {
|
// if (group.getID().equals(specialGroup.getID())) {
|
||||||
isPresent = true;
|
// isPresent = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
assertTrue(isPresent);
|
assertTrue(isPresent);
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
Reference in New Issue
Block a user