diff options
author | Håvard Pettersen <havardpe@oath.com> | 2018-09-26 12:06:23 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2018-09-26 12:06:23 +0000 |
commit | 86af577637a859f1b0306a7d3b1c7221641ccd7c (patch) | |
tree | 03607da22d44185af68178ed9523b7f39e624a49 /jrt | |
parent | f2c3e8dbc888239c88ee8d1ef8fb280f8c3012de (diff) |
use junit assert
Diffstat (limited to 'jrt')
-rw-r--r-- | jrt/tests/com/yahoo/jrt/TlsDetectionTest.java | 6 |
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() { |