X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreateReplyCommandTest.java;h=bef609ab2d44d79bccb0d569767ce1f3b606c83a;hb=2d37242d19f2e726cd402b99f935a0eba282f630;hp=2241eaf63ed76478cb2a6a8654b1dca6e45bfe32;hpb=1be3820cd48951abbcfd5a7f95b82d44aa0e016a;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..bef609a 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.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())); }