Skip to content

Commit 33906a8

Browse files
committed
Start using camel's junit5 support
1 parent b04730e commit 33906a8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ dependencies {
6565
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
6666
testImplementation group: 'org.junit.platform', name: 'junit-platform-runner', version: junitPlatformVersion
6767
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitVersion
68-
testImplementation group: 'org.apache.camel', name: 'camel-test', version: camelVersion
68+
testImplementation group: 'org.apache.camel', name: 'camel-test-junit5', version: camelVersion
6969
testImplementation group: 'jakarta.xml.bind', name: 'jakarta.xml.bind-api', version: jaxbApiVersion
7070
testImplementation group: 'jakarta.activation', name: 'jakarta.activation-api', version: activationApiVersion
7171
}

src/test/java/org/trellisldp/camel/ActivityStreamProcessorTest.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package org.trellisldp.camel;
1515

1616
import static java.util.Arrays.asList;
17+
import static org.junit.jupiter.api.Assertions.assertEquals;
1718
import static org.trellisldp.camel.ActivityStreamProcessor.ACTIVITY_STREAM_ACTOR;
1819
import static org.trellisldp.camel.ActivityStreamProcessor.ACTIVITY_STREAM_ID;
1920
import static org.trellisldp.camel.ActivityStreamProcessor.ACTIVITY_STREAM_INBOX;
@@ -31,8 +32,8 @@
3132
import org.apache.camel.ProducerTemplate;
3233
import org.apache.camel.builder.RouteBuilder;
3334
import org.apache.camel.component.mock.MockEndpoint;
34-
import org.apache.camel.test.junit4.CamelTestSupport;
35-
import org.junit.Test;
35+
import org.apache.camel.test.junit5.CamelTestSupport;
36+
import org.junit.jupiter.api.Test;
3637

3738
/**
3839
* @author acoburn
@@ -87,7 +88,7 @@ public void testActivityStreamProcessor() throws IOException, InterruptedExcepti
8788
resultEndpoint.assertIsSatisfied();
8889

8990
final Map result = resultEndpoint.getExchanges().get(0).getIn().getBody(Map.class);
90-
assertEquals("Check the result body", data, result);
91+
assertEquals(data, result, "Check the result body");
9192
}
9293

9394
@Test
@@ -114,7 +115,7 @@ public void testActivityStreamProcessorMissingSomeValues() throws IOException, I
114115
resultEndpoint.assertIsSatisfied();
115116

116117
final Map result = resultEndpoint.getExchanges().get(0).getIn().getBody(Map.class);
117-
assertEquals("Check the result body", data, result);
118+
assertEquals(data, result, "Check the result body");
118119
}
119120

120121
@Test
@@ -134,7 +135,7 @@ public void testActivityStreamProcessorMissingAllValues() throws IOException, In
134135
resultEndpoint.assertIsSatisfied();
135136

136137
final Map result = resultEndpoint.getExchanges().get(0).getIn().getBody(Map.class);
137-
assertEquals("Check the result body", data, result);
138+
assertEquals(data, result, "Check the result body");
138139
}
139140

140141
@Override

0 commit comments

Comments
 (0)