Skip to content

Commit

Permalink
do not delete Process in ImportService IT
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed May 3, 2024
1 parent 69bc8f6 commit 6b18e0c
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,12 @@ public void testImportProcessWithAdditionalMetadata() throws DAOException, Impor
Workpiece workpiece = ServiceManager.getMetsService()
.loadWorkpiece(processService.getMetadataFileUri(processWithAdditionalMetadata));
HashSet<Metadata> metadata = workpiece.getLogicalStructure().getMetadata();
try {
Assert.assertTrue("Process does not contain correct metadata",
assertMetadataSetContainsMetadata(metadata, TITLE, "Band 1"));
Assert.assertTrue("Process does not contain correct metadata",
assertMetadataSetContainsMetadata(metadata, PLACE, "Hamburg"));
Assert.assertTrue("Process does not contain correct metadata",
assertMetadataSetContainsMetadata(metadata, PLACE, "Berlin"));
} finally {
ProcessService.deleteProcess(processWithAdditionalMetadata.getId());
}
Assert.assertTrue("Process does not contain correct metadata",
assertMetadataSetContainsMetadata(metadata, TITLE, "Band 1"));
Assert.assertTrue("Process does not contain correct metadata",
assertMetadataSetContainsMetadata(metadata, PLACE, "Hamburg"));
Assert.assertTrue("Process does not contain correct metadata",
assertMetadataSetContainsMetadata(metadata, PLACE, "Berlin"));
}

private boolean assertMetadataSetContainsMetadata(HashSet<Metadata> metadataSet, String metadataKey, String metadataValue) {
Expand Down

0 comments on commit 6b18e0c

Please sign in to comment.