summaryrefslogtreecommitdiffstats
path: root/jrt/tests
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2018-09-26 12:06:23 +0000
committerHåvard Pettersen <havardpe@oath.com>2018-09-26 12:06:23 +0000
commit86af577637a859f1b0306a7d3b1c7221641ccd7c (patch)
tree03607da22d44185af68178ed9523b7f39e624a49 /jrt/tests
parentf2c3e8dbc888239c88ee8d1ef8fb280f8c3012de (diff)
use junit assert
Diffstat (limited to 'jrt/tests')
-rw-r--r--jrt/tests/com/yahoo/jrt/TlsDetectionTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java b/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java
index 9bd37e25772..db7dba313b4 100644
--- a/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java
+++ b/jrt/tests/com/yahoo/jrt/TlsDetectionTest.java
@@ -1,6 +1,8 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;
+import static org.junit.Assert.assertEquals;
+
public class TlsDetectionTest {
static private String message(byte[] data, boolean actual) {
@@ -24,9 +26,7 @@ public class TlsDetectionTest {
data[i] = (byte) values[i];
}
boolean actual = MaybeTlsCryptoSocket.looksLikeTlsToMe(data);
- if(actual != expect) {
- throw new AssertionError(message(data, actual));
- }
+ assertEquals(message(data, actual), expect, actual);
}
@org.junit.Test public void testValidHandshake() {