* The āSendTextFeedā command sends an arbitrary text to a peer node.
*
* @author David āBombeā Roden <bombe@freenetproject.org>
+ * @deprecated Use {@link SendText} instead,
+ * the {@code SendTextFeed} message has been removed in build 1236.
*/
+@Deprecated
public class SendTextFeed extends AbstractSendFeedMessage {
/**
--- /dev/null
+package net.pterodactylus.fcp;
+
+import org.junit.Test;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static net.pterodactylus.fcp.test.InputStreamMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.equalTo;
+
+public class SendTextFeedTest {
+
+ @Test
+ public void sendTextMessageHasCorrectName() {
+ assertThat(sendText.getName(), equalTo("SendTextFeed"));
+ }
+
+ @Test
+ public void sendTextMessageSetsIdentifierField() {
+ assertThat(sendText.getField("Identifier"), equalTo("identifier"));
+ }
+
+ @Test
+ public void sendTextMessageSetsNodeIdentifierField() {
+ assertThat(sendText.getField("NodeIdentifier"), equalTo("node-identifier"));
+ }
+
+ @Test
+ public void sendTextMessageSetsTextField() {
+ assertThat(sendText.getField("Text"), equalTo("HƤllo WÅrld"));
+ }
+
+ private final SendTextFeed sendText = new SendTextFeed("identifier", "node-identifier", "HƤllo WÅrld");
+
+}