From a2719746ff2770a9198b67ad7c6d3e64b893b482 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 30 Oct 2013 22:23:16 +0100 Subject: [PATCH] Move name of message into method parameter. --- .../java/net/pterodactylus/sone/fcp/GetPostCommandTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/net/pterodactylus/sone/fcp/GetPostCommandTest.java b/src/test/java/net/pterodactylus/sone/fcp/GetPostCommandTest.java index d303535..2c72cdf 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/GetPostCommandTest.java +++ b/src/test/java/net/pterodactylus/sone/fcp/GetPostCommandTest.java @@ -59,7 +59,7 @@ public class GetPostCommandTest { .put("Post", "PostId") .get(); Response response = getPostCommand.execute(getPostFieldSet, null, DIRECT); - verifyAnswer(response); + verifyAnswer(response, "Post"); verifyPost(post, response); } @@ -73,7 +73,7 @@ public class GetPostCommandTest { .put("Post", "PostId") .get(); Response response = getPostCommand.execute(getPostFieldSet, null, DIRECT); - verifyAnswer(response); + verifyAnswer(response, "Post"); verifyPost(post, response); } @@ -92,7 +92,7 @@ public class GetPostCommandTest { .put("IncludeReplies", "true") .get(); Response response = getPostCommand.execute(getPostFieldSet, null, DIRECT); - verifyAnswer(response); + verifyAnswer(response, "Post"); verifyPost(post, response); assertThat(response.getReplyParameters().getInt("Post.Replies.Count"), is(post.getReplies().size())); verifyReply(response.getReplyParameters(), "Post.Replies.0.", postReply1); @@ -138,10 +138,10 @@ public class GetPostCommandTest { return post; } - private void verifyAnswer(Response response) { + private void verifyAnswer(Response response, String messageName) { assertThat(response, notNullValue()); assertThat(response.getReplyParameters(), notNullValue()); - assertThat(response.getReplyParameters().get("Message"), is("Post")); + assertThat(response.getReplyParameters().get("Message"), is(messageName)); } private void verifyReply(SimpleFieldSet replyParameters, String prefix, PostReply postReply) throws FSParseException { -- 2.7.4