Skip to content

Commit

Permalink
Replace Junit 4 with Junit 5
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Aug 5, 2024
1 parent 4d7f518 commit b7c5f2b
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,24 +23,24 @@
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;
import org.kitodo.production.services.ServiceManager;
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();
Expand Down Expand Up @@ -433,8 +433,8 @@ public void execute(List<Process> 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");
}
}

0 comments on commit b7c5f2b

Please sign in to comment.