From: David ‘Bombe’ Roden Date: Wed, 8 Jan 2025 20:34:26 +0000 (+0100) Subject: ♻️ Use notNullValue() instead of not(nullValue()) X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=92acdbaf66cb4d94b379e2037f92105e127f7013;p=jFCPlib.git ♻️ Use notNullValue() instead of not(nullValue()) --- 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")) ));