From 92acdbaf66cb4d94b379e2037f92105e127f7013 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 8 Jan 2025 21:34:26 +0100 Subject: [PATCH] =?utf8?q?=E2=99=BB=EF=B8=8F=20Use=20notNullValue()=20inst?= =?utf8?q?ead=20of=20not(nullValue())?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../pterodactylus/fcp/plugin/WebOfTrustPluginTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/net/pterodactylus/fcp/plugin/WebOfTrustPluginTest.java b/src/test/java/net/pterodactylus/fcp/plugin/WebOfTrustPluginTest.java index f63c6cf..ab03b27 100644 --- a/src/test/java/net/pterodactylus/fcp/plugin/WebOfTrustPluginTest.java +++ b/src/test/java/net/pterodactylus/fcp/plugin/WebOfTrustPluginTest.java @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThrows; @@ -54,7 +54,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.createIdentity("Test Nickname", "test-context", true); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.Message", equalTo("CreateIdentity")), hasField("Param.Nickname", equalTo("Test Nickname")), @@ -79,7 +79,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.createIdentity("Test Nickname", "test-context", true, "insert-uri"); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.Message", equalTo("CreateIdentity")), hasField("Param.Nickname", equalTo("Test Nickname")), @@ -104,7 +104,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.createIdentity("Test Nickname", "test-context", true, "some-request-uri", "insert-uri"); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.Message", equalTo("CreateIdentity")), hasField("Param.Nickname", equalTo("Test Nickname")), @@ -161,7 +161,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.getOwnIdentities(); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.Message", equalTo("GetOwnIdentities")) )); @@ -189,7 +189,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.getOwnIdentites(); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.Message", equalTo("GetOwnIdentities")) )); @@ -245,7 +245,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.getIdentityTrust(ownIdentity, "other-id"); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.Message", equalTo("GetIdentity")), hasField("Param.Truster", equalTo("own-id")), @@ -335,7 +335,7 @@ public class WebOfTrustPluginTest { webOfTrustPlugin.addIdentity("USK@foo,bar/baz/123"); assertThat(fcpConnection.sentMessages.get(0), allOf( isNamed(equalTo("FCPPluginMessage")), - hasField("Identifier", not(nullValue())), + hasField("Identifier", notNullValue()), hasField("PluginName", equalTo("plugins.WebOfTrust.WebOfTrust")), hasField("Param.RequestURI", equalTo("USK@foo,bar/baz/123")) )); -- 2.7.4