You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/02/09 08:18:42 UTC

[incubator-plc4x] branch feature/junit4 updated: Ported the entire project to use JUnit4 - Fixed some invalidly ported assertions

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/junit4
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git


The following commit(s) were added to refs/heads/feature/junit4 by this push:
     new 98c0665  Ported the entire project to use JUnit4 - Fixed some invalidly ported assertions
98c0665 is described below

commit 98c06652682d67aff287955fb0374f0f6f522d20
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Feb 9 09:18:31 2018 +0100

    Ported the entire project to use JUnit4
    - Fixed some invalidly ported assertions
---
 .../plc4x/java/isotp/netty/model/tpdus/IsotpModelTests.java       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/tpdus/IsotpModelTests.java b/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/tpdus/IsotpModelTests.java
index 33b69a8..78aa79c 100644
--- a/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/tpdus/IsotpModelTests.java
+++ b/plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/isotp/netty/model/tpdus/IsotpModelTests.java
@@ -108,7 +108,7 @@ public class IsotpModelTests {
 
         ConnectionRequestTpdu tpdu = new ConnectionRequestTpdu(destinationReference, sourceReference, protocolClass, parameters, userData);
 
-        assertThat(tpdu.getTpduCode() == TpduCode.CONNECTION_REQUEST);
+        assertThat(tpdu.getTpduCode()).isEqualTo(TpduCode.CONNECTION_REQUEST);
         assertThat(tpdu.getDestinationReference()).isEqualTo((short) 0x1).withFailMessage("Unexpected destination reference");
         assertThat(tpdu.getSourceReference()).isEqualTo((short) 0x2).withFailMessage("Unexpected source reference");
         assertThat(tpdu.getProtocolClass()).isEqualTo(ProtocolClass.CLASS_0);
@@ -129,7 +129,7 @@ public class IsotpModelTests {
 
         ConnectionConfirmTpdu tpdu = new ConnectionConfirmTpdu(destinationReference, sourceReference, protocolClass, parameters, userData);
 
-        assertThat(tpdu.getTpduCode() == TpduCode.CONNECTION_CONFIRM);
+        assertThat(tpdu.getTpduCode()).isEqualTo(TpduCode.CONNECTION_CONFIRM);
         assertThat(tpdu.getDestinationReference()).isEqualTo((short) 0x3).withFailMessage("Unexpected destination reference");
         assertThat(tpdu.getSourceReference()).isEqualTo((short) 0x4).withFailMessage("Unexpected source reference");
         assertThat(tpdu.getProtocolClass()).isEqualTo(ProtocolClass.CLASS_1);
@@ -150,7 +150,7 @@ public class IsotpModelTests {
 
         DisconnectRequestTpdu tpdu = new DisconnectRequestTpdu(destinationReference, sourceReference, disconnectReason, parameters, userData);
 
-        assertThat(tpdu.getTpduCode() == TpduCode.DISCONNECT_REQUEST);
+        assertThat(tpdu.getTpduCode()).isEqualTo(TpduCode.DISCONNECT_REQUEST);
         assertThat(tpdu.getDestinationReference()).isEqualTo((short) 0x1).withFailMessage("Unexpected destination reference");
         assertThat(tpdu.getSourceReference()).isEqualTo((short) 0x2).withFailMessage("Unexpected source reference");
         assertThat(tpdu.getDisconnectReason()).isEqualTo(DisconnectReason.ADDRESS_UNKNOWN);
@@ -170,7 +170,7 @@ public class IsotpModelTests {
 
         DisconnectConfirmTpdu tpdu = new DisconnectConfirmTpdu(destinationReference, sourceReference, parameters, userData);
 
-        assertThat(tpdu.getTpduCode() == TpduCode.DISCONNECT_CONFIRM);
+        assertThat(tpdu.getTpduCode()).isEqualTo(TpduCode.DISCONNECT_CONFIRM);
         assertThat(tpdu.getDestinationReference()).isEqualTo((short) 0x3).withFailMessage("Unexpected destination reference");
         assertThat(tpdu.getSourceReference()).isEqualTo((short) 0x4).withFailMessage("Unexpected source reference");
         assertThat(tpdu.getParameters().isEmpty()).isTrue().withFailMessage("Unexpected parameters");

-- 
To stop receiving notification emails like this one, please contact
cdutz@apache.org.