mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-19 07:53:08 +00:00
Fixes to various errorprone warnings in tests
This commit is contained in:
@@ -13,7 +13,6 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.dspace.authorize.service.AuthorizeService;
|
||||
@@ -137,7 +136,7 @@ public class RelationshipServiceImplTest {
|
||||
@Test
|
||||
public void testFindByItemAndRelationshipType() throws Exception {
|
||||
// Declare objects utilized in unit test
|
||||
List<Relationship> relList = new LinkedList<>();
|
||||
List<Relationship> relList = new ArrayList<>();
|
||||
Item item = mock(Item.class);
|
||||
RelationshipType testRel = new RelationshipType();
|
||||
|
||||
@@ -152,7 +151,7 @@ public class RelationshipServiceImplTest {
|
||||
@Test
|
||||
public void testFindByRelationshipType() throws Exception {
|
||||
// Declare objects utilized in unit test
|
||||
List<Relationship> relList = new LinkedList<>();
|
||||
List<Relationship> relList = new ArrayList<>();
|
||||
RelationshipType testRel = new RelationshipType();
|
||||
|
||||
// The Relationship(s) reported should match our our relList
|
||||
@@ -232,7 +231,6 @@ public class RelationshipServiceImplTest {
|
||||
|
||||
// Declare objects utilized in unit test
|
||||
MetadataValue metVal = mock(MetadataValue.class);
|
||||
List<MetadataValue> metsList = new ArrayList<>();
|
||||
List<Relationship> leftTypelist = new ArrayList<>();
|
||||
List<Relationship> rightTypelist = new ArrayList<>();
|
||||
Item leftItem = mock(Item.class);
|
||||
@@ -246,7 +244,6 @@ public class RelationshipServiceImplTest {
|
||||
testRel.setRightwardType("Entitylabel");
|
||||
testRel.setLeftMinCardinality(0);
|
||||
testRel.setRightMinCardinality(0);
|
||||
metsList.add(metVal);
|
||||
relationship = getRelationship(leftItem, rightItem, testRel, 0,0);
|
||||
leftTypelist.add(relationship);
|
||||
rightTypelist.add(relationship);
|
||||
|
Reference in New Issue
Block a user