Skip to content

Commit 146f40c

Browse files
committed
Improve test on empty crate comparison.
1 parent 9371dea commit 146f40c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/edu/kit/datamanager/ro_crate/entities/AbstractEntity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ public Set<String> getLinkedTo() {
9191
return linkedTo;
9292
}
9393

94+
/**
95+
* Returns the types of this entity.
96+
* @return a set of type strings.
97+
*/
98+
public Set<String> getTypes() {
99+
return types;
100+
}
101+
94102
/**
95103
* Returns a Json object containing the properties of the entity.
96104
*

src/test/java/edu/kit/datamanager/ro_crate/crate/BuilderTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ void testEmptyCrates() throws JsonProcessingException {
3838

3939
assertEquals(built.getAllDataEntities(), constructed.getAllDataEntities());
4040
assertEquals(built.getAllContextualEntities(), constructed.getAllContextualEntities());
41+
assertEquals(built.getJsonDescriptor().getTypes(), constructed.getJsonDescriptor().getTypes());
42+
assertEquals(built.getJsonDescriptor().getProperties(), constructed.getJsonDescriptor().getProperties());
4143
HelpFunctions.compareTwoCrateJson(built, constructed);
4244
}
4345
}

0 commit comments

Comments
 (0)