Skip to content

Commit

Permalink
Merge pull request #4938 from Kathrin-Huber/fix_scriptTest
Browse files Browse the repository at this point in the history
use correct syntax
  • Loading branch information
Kathrin-Huber authored Feb 23, 2022
2 parents ca6e85c + 47a1058 commit c9f4e46
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,17 +413,17 @@ public void shouldAddDataWithWhitespace() throws Exception {
HashMap<String, String> metadataSearchMap = new HashMap<>();
metadataSearchMap.put(metadataKey, "legal note");

final List<ProcessDTO> processByMetadata = ServiceManager.getProcessService().findByMetadata(metadataSearchMap);
final List<ProcessDTO> processByMetadata = ServiceManager.getProcessService().findByMetadata(metadataSearchMap, true);
Assert.assertEquals("should not contain metadata beforehand", 0, processByMetadata.size() );

String script = "action:addData " + "key:" + metadataKey + " value:\"legal note\"";
String script = "action:addData " + "key:" + metadataKey + " \"value:legal note\"";
List<Process> processes = new ArrayList<>();
processes.add(process);
KitodoScriptService kitodoScript = ServiceManager.getKitodoScriptService();
kitodoScript.execute(processes, script);
Thread.sleep(2000);
final List<ProcessDTO> processByMetadataAfter = ServiceManager.getProcessService()
.findByMetadata(metadataSearchMap);
.findByMetadata(metadataSearchMap, true);
Assert.assertEquals("does not contain metadata", 1, processByMetadataAfter.size() );

}
Expand Down

0 comments on commit c9f4e46

Please sign in to comment.