From 3beb8beaeb3bfc54260b956f1392003a88d8b882 Mon Sep 17 00:00:00 2001 From: games647 Date: Sat, 27 Jan 2018 18:47:01 +0100 Subject: [PATCH] Migrate tests to assertThat --- .../games647/fastlogin/bukkit/EncryptionUtilTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bukkit/src/test/java/com/github/games647/fastlogin/bukkit/EncryptionUtilTest.java b/bukkit/src/test/java/com/github/games647/fastlogin/bukkit/EncryptionUtilTest.java index 7f6bf149..c310a057 100644 --- a/bukkit/src/test/java/com/github/games647/fastlogin/bukkit/EncryptionUtilTest.java +++ b/bukkit/src/test/java/com/github/games647/fastlogin/bukkit/EncryptionUtilTest.java @@ -4,8 +4,10 @@ import java.security.SecureRandom; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; + +import static org.junit.Assert.assertThat; public class EncryptionUtilTest { @@ -14,8 +16,8 @@ public class EncryptionUtilTest { SecureRandom random = new SecureRandom(); byte[] token = EncryptionUtil.generateVerifyToken(random); - assertNotNull(token); - assertEquals(4, token.length); + assertThat(token, notNullValue()); + assertThat(token.length, is(4)); } // @Test