X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreateReplyCommandTest.java;h=36f99a803c137b2f8bdd8d861a0a6e6ac5ab81f1;hb=67d172414f70c588e878c64ec8ba43f388bc93bb;hp=2241eaf63ed76478cb2a6a8654b1dca6e45bfe32;hpb=d1e15185426a5a66a1d67fd0ba24fcacf17df556;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/fcp/CreateReplyCommandTest.java b/src/test/java/net/pterodactylus/sone/fcp/CreateReplyCommandTest.java index 2241eaf..36f99a8 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/CreateReplyCommandTest.java +++ b/src/test/java/net/pterodactylus/sone/fcp/CreateReplyCommandTest.java @@ -18,6 +18,7 @@ package net.pterodactylus.sone.fcp; import static java.lang.System.currentTimeMillis; +import static net.pterodactylus.sone.fcp.Verifiers.verifyAnswer; import static net.pterodactylus.sone.freenet.fcp.Command.AccessType.DIRECT; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -64,15 +65,13 @@ public class CreateReplyCommandTest { .put("Text", "Text of the reply.") .get(); Response response = createReplyCommand.execute(createReplyFieldSet, null, DIRECT); - assertThat(response, notNullValue()); + verifyAnswer(response, "ReplyCreated"); assertThat(capturingPostReplyCreated.postReply, notNullValue()); assertThat(capturingPostReplyCreated.postReply.getId(), notNullValue()); assertThat(capturingPostReplyCreated.postReply.getPostId(), is("PostId")); assertThat(capturingPostReplyCreated.postReply.getSone(), is(sone)); assertThat(capturingPostReplyCreated.postReply.getTime(), allOf(greaterThanOrEqualTo(now), lessThanOrEqualTo(currentTimeMillis()))); assertThat(capturingPostReplyCreated.postReply.getText(), is("Text of the reply.")); - assertThat(response.getReplyParameters(), notNullValue()); - assertThat(response.getReplyParameters().get("Message"), is("ReplyCreated")); assertThat(response.getReplyParameters().get("Reply"), is(capturingPostReplyCreated.postReply.getId())); }