From: David ‘Bombe’ Roden Date: Thu, 2 Jan 2025 22:06:47 +0000 (+0100) Subject: ✅ Add test for ListPeerNotes X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4c48f25b8252ea2ad70aa87c8600321a18c83418;p=jFCPlib.git ✅ Add test for ListPeerNotes --- diff --git a/src/test/java/net/pterodactylus/fcp/ListPeerNotesTest.java b/src/test/java/net/pterodactylus/fcp/ListPeerNotesTest.java new file mode 100644 index 0000000..622842f --- /dev/null +++ b/src/test/java/net/pterodactylus/fcp/ListPeerNotesTest.java @@ -0,0 +1,23 @@ +package net.pterodactylus.fcp; + +import org.junit.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.equalTo; + +public class ListPeerNotesTest { + + @Test + public void listPeerNotesWithNodeIdentifierSetsNodeIdentifierField() { + ListPeerNotes listPeerNotes = new ListPeerNotes("node-identifier"); + assertThat(listPeerNotes.getField("NodeIdentifier"), equalTo("node-identifier")); + } + + @Test + public void listPeerNotesWithIdentifierAndNodeIdentifierSetsIdentifierAndNodeIdentifierField() { + ListPeerNotes listPeerNotes = new ListPeerNotes("identifier", "node-identifier"); + assertThat(listPeerNotes.getField("Identifier"), equalTo("identifier")); + assertThat(listPeerNotes.getField("NodeIdentifier"), equalTo("node-identifier")); + } + +}