Mock posts with a mocker, too.
[Sone.git] / src / test / java / net / pterodactylus / sone / fcp / CreateReplyCommandTest.java
index 70f9996..2241eaf 100644 (file)
@@ -53,8 +53,8 @@ public class CreateReplyCommandTest {
 
        @Test
        public void verifyThatCreatingAFullySpecifiedReplyWorks() throws FcpException {
-               Sone sone = mocks.mockLocalSone("SoneId");
-               mocks.mockPost(sone, "PostId");
+               Sone sone = mocks.mockSone("SoneId").local().create();
+               mocks.mockPost(sone, "PostId").create();
                CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
                when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));
                SimpleFieldSet createReplyFieldSet = new SimpleFieldSetBuilder()
@@ -78,8 +78,8 @@ public class CreateReplyCommandTest {
 
        @Test(expected = FcpException.class)
        public void verifyThatCreatingAReplyWithoutSoneCausesAnError() throws FcpException {
-               Sone sone = mocks.mockLocalSone("SoneId");
-               mocks.mockPost(sone, "PostId");
+               Sone sone = mocks.mockSone("SoneId").local().create();
+               mocks.mockPost(sone, "PostId").create();
                CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
                when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));
                SimpleFieldSet createReplyFieldSet = new SimpleFieldSetBuilder()
@@ -92,7 +92,7 @@ public class CreateReplyCommandTest {
 
        @Test(expected = FcpException.class)
        public void verifyThatCreatingAReplyWithoutPostCausesAnError() throws FcpException {
-               mocks.mockLocalSone("SoneId");
+               mocks.mockSone("SoneId").local().create();
                CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
                when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));
                SimpleFieldSet createReplyFieldSet = new SimpleFieldSetBuilder()
@@ -105,8 +105,8 @@ public class CreateReplyCommandTest {
 
        @Test(expected = FcpException.class)
        public void verifyThatCreatingAReplyWithoutTextCausesAnError() throws FcpException {
-               Sone sone = mocks.mockLocalSone("SoneId");
-               mocks.mockPost(sone, "PostId");
+               Sone sone = mocks.mockSone("SoneId").local().create();
+               mocks.mockPost(sone, "PostId").create();
                CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
                when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));
                SimpleFieldSet createReplyFieldSet = new SimpleFieldSetBuilder()