From b7c5f2be26986ef9b9844dd02d7509ba8ececa7c Mon Sep 17 00:00:00 2001 From: Matthias Ronge Date: Thu, 1 Aug 2024 09:47:48 +0200 Subject: [PATCH] Replace Junit 4 with Junit 5 --- .../activemq/KitodoScriptProcessorIT.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Kitodo/src/test/java/org/kitodo/production/interfaces/activemq/KitodoScriptProcessorIT.java b/Kitodo/src/test/java/org/kitodo/production/interfaces/activemq/KitodoScriptProcessorIT.java index 7fb4ee2ef4e..ac6f5121b03 100644 --- a/Kitodo/src/test/java/org/kitodo/production/interfaces/activemq/KitodoScriptProcessorIT.java +++ b/Kitodo/src/test/java/org/kitodo/production/interfaces/activemq/KitodoScriptProcessorIT.java @@ -10,7 +10,7 @@ */ package org.kitodo.production.interfaces.activemq; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.lang.reflect.Field; import java.util.ArrayList; @@ -23,9 +23,9 @@ import javax.jms.JMSException; import javax.jms.MapMessage; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.kitodo.MockDatabase; import org.kitodo.SecurityTestUtils; import org.kitodo.data.database.beans.Process; @@ -33,14 +33,14 @@ import org.kitodo.production.services.command.KitodoScriptService; public class KitodoScriptProcessorIT { - @Before + @BeforeAll public void prepare() throws Exception { MockDatabase.startNode(); MockDatabase.insertProcessesForWorkflowFull(); SecurityTestUtils.addUserDataToSecurityContext(ServiceManager.getUserService().getById(1), 1); } - @After + @AfterAll public void clean() throws Exception { MockDatabase.stopNode(); MockDatabase.cleanDatabase(); @@ -433,8 +433,8 @@ public void execute(List processes, String script) { underTest.process(testData); // check results - assertEquals("should have passed the script to be executed", scriptResult.get(0), "action:test"); - assertEquals("should have passed one process", processesResult.size(), 1); - assertEquals("should have passed process 1", processesResult.get(0).getId(), (Integer) 1); + assertEquals(scriptResult.get(0), "action:test", "should have passed the script to be executed"); + assertEquals(processesResult.size(), 1, "should have passed one process"); + assertEquals(processesResult.get(0).getId(), 1, "should have passed process 1"); } }