🗑️ Deprecate SubscribeFeeds message
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 6 Jan 2025 10:59:26 +0000 (11:59 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 6 Jan 2025 10:59:26 +0000 (11:59 +0100)
src/main/java/net/pterodactylus/fcp/SubscribeFeeds.java
src/test/java/net/pterodactylus/fcp/SubscribeFeedsTest.java [new file with mode: 0644]

index 523ab3f..8e995f8 100644 (file)
@@ -22,7 +22,10 @@ package net.pterodactylus.fcp;
  * receiving the feeds sent by peer nodes.
  *
  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
+ * @deprecated Use {@link WatchFeeds} instead,
+ *        {@code SubscribeFeeds} was removed in Hyphanet build 1236.
  */
+@Deprecated
 public class SubscribeFeeds extends FcpMessage {
 
        /**
diff --git a/src/test/java/net/pterodactylus/fcp/SubscribeFeedsTest.java b/src/test/java/net/pterodactylus/fcp/SubscribeFeedsTest.java
new file mode 100644 (file)
index 0000000..31766e6
--- /dev/null
@@ -0,0 +1,22 @@
+package net.pterodactylus.fcp;
+
+import org.junit.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.equalTo;
+
+public class SubscribeFeedsTest {
+
+       @Test
+       public void subscribeFeedsMessageHasCorrectName() {
+               assertThat(subscribeFeeds.getName(), equalTo("SubscribeFeeds"));
+       }
+
+       @Test
+       public void subscribeFeedsMessageSetsCorrectIdentifierField() {
+               assertThat(subscribeFeeds.getField("Identifier"), equalTo("identifier"));
+       }
+
+       private final SubscribeFeeds subscribeFeeds = new SubscribeFeeds("identifier");
+
+}