mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
77489: Fix test TiltedRelationshipMetadataServiceIT#testGetAuthorRelationshipMetadata
This commit is contained in:
@@ -69,18 +69,12 @@ public class TiltedRelationshipMetadataServiceIT extends RelationshipMetadataSer
|
|||||||
// rightItem is the author
|
// rightItem is the author
|
||||||
List<MetadataValue> rightRelationshipMetadataList = itemService
|
List<MetadataValue> rightRelationshipMetadataList = itemService
|
||||||
.getMetadata(rightItem, MetadataSchemaEnum.RELATION.getName(), "isPublicationOfAuthor", null, Item.ANY);
|
.getMetadata(rightItem, MetadataSchemaEnum.RELATION.getName(), "isPublicationOfAuthor", null, Item.ANY);
|
||||||
assertThat(rightRelationshipMetadataList.size(), equalTo(1));
|
assertThat(rightRelationshipMetadataList.size(), equalTo(0));
|
||||||
assertThat(rightRelationshipMetadataList.get(0).getValue(), equalTo(String.valueOf(leftItem.getID())));
|
|
||||||
|
|
||||||
//request the virtual metadata of the publication
|
//request the virtual metadata of the publication
|
||||||
List<RelationshipMetadataValue> rightList = relationshipMetadataService
|
List<RelationshipMetadataValue> rightList = relationshipMetadataService
|
||||||
.getRelationshipMetadata(rightItem, true);
|
.getRelationshipMetadata(rightItem, true);
|
||||||
assertThat(rightList.size(), equalTo(1));
|
assertThat(rightList.size(), equalTo(0));
|
||||||
assertThat(rightList.get(0).getValue(), equalTo(String.valueOf(leftItem.getID())));
|
|
||||||
assertThat(rightList.get(0).getMetadataField().getMetadataSchema().getName(),
|
|
||||||
equalTo(MetadataSchemaEnum.RELATION.getName()));
|
|
||||||
assertThat(rightList.get(0).getMetadataField().getElement(), equalTo("isPublicationOfAuthor"));
|
|
||||||
assertThat(rightList.get(0).getAuthority(), equalTo("virtual::" + relationship.getID()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user