You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/01/12 12:58:49 UTC
[incubator-plc4x] branch master updated: fix missing coverage by
switching to junit5 and make test compatible
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/master by this push:
new 38e344e fix missing coverage by switching to junit5 and make test compatible
38e344e is described below
commit 38e344e8158084d2062279dc0fc33174f4ea695d
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jan 12 13:58:45 2018 +0100
fix missing coverage by switching to junit5 and make test compatible
---
integrations/apache-camel/pom.xml | 26 +++++-----------------
.../java/org/apache/plc4x/camel/ConstantsTest.java | 13 +++++++++++
.../org/apache/plc4x/camel/PLC4XComponentTest.java | 14 +++++++++++-
3 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/integrations/apache-camel/pom.xml b/integrations/apache-camel/pom.xml
index 378083c..b281528 100644
--- a/integrations/apache-camel/pom.xml
+++ b/integrations/apache-camel/pom.xml
@@ -72,26 +72,6 @@
<!-- logging -->
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>2.9.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <!-- TODO: version temporary defined due to PLC4X-22-->
- <version>2.9.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <!-- TODO: version temporary defined due to PLC4X-22-->
- <version>2.9.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<!-- TODO: version temporary defined due to PLC4X-22-->
@@ -112,6 +92,12 @@
<!-- TODO: version temporary defined due to PLC4X-22-->
<version>2.20.1</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <version>${junit-jupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<dependencyManagement>
diff --git a/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java b/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java
new file mode 100644
index 0000000..6e34be1
--- /dev/null
+++ b/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/ConstantsTest.java
@@ -0,0 +1,13 @@
+package org.apache.plc4x.camel;
+
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class ConstantsTest {
+
+ @Test
+ public void testConstantsNotInstanceable() throws Exception {
+ Assertions.assertThrows(IllegalAccessException.class, Constants.class::newInstance);
+ }
+}
\ No newline at end of file
diff --git a/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/PLC4XComponentTest.java b/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/PLC4XComponentTest.java
index 0685091..30dc30c 100644
--- a/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/PLC4XComponentTest.java
+++ b/integrations/apache-camel/src/test/java/org/apache/plc4x/camel/PLC4XComponentTest.java
@@ -23,12 +23,24 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.apache.plc4x.java.s7.model.S7Address;
import org.apache.plc4x.java.s7.netty.model.types.MemoryArea;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import java.util.concurrent.TimeUnit;
public class PLC4XComponentTest extends CamelTestSupport {
+ @BeforeEach
+ public void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @AfterEach
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
@Test
public void testSimpleRouting() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
--
To stop receiving notification emails like this one, please contact
['"commits@plc4x.apache.org" <co...@plc4x.apache.org>'].