X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommandTest.java;h=f9cb1abeca7bd16210530d6bbf8fa6e7b04f598d;hb=2c1a8dbe9f2b08d78b172523bdfecddf9a33a2a8;hp=6cc6f613da564e4ef737209c68cc28f951a7e847;hpb=844bd06ee895aa3a050192b5063b1efe1a85f80b;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/fcp/CreatePostCommandTest.java b/src/test/java/net/pterodactylus/sone/fcp/CreatePostCommandTest.java index 6cc6f61..f9cb1ab 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/CreatePostCommandTest.java +++ b/src/test/java/net/pterodactylus/sone/fcp/CreatePostCommandTest.java @@ -55,8 +55,8 @@ public class CreatePostCommandTest { @Test public void verifyThatCreatingAPostWorks() throws FcpException { - Sone sone = mocks.mockLocalSone("Sone"); - mocks.mockLocalSone("OtherSone"); + Sone sone = mocks.mockSone("Sone").local().create(); + mocks.mockSone("OtherSone").local().create(); CapturingPostCreated capturingPostCreated = new CapturingPostCreated(); when(mocks.core.postCreated()).thenReturn(Optional.of(capturingPostCreated)); @@ -78,7 +78,7 @@ public class CreatePostCommandTest { @Test public void verifyThatCreatingAPostWithoutRecipientWorks() throws FcpException { - Sone sone = mocks.mockLocalSone("Sone"); + Sone sone = mocks.mockSone("Sone").local().create(); CapturingPostCreated capturingPostCreated = new CapturingPostCreated(); when(mocks.core.postCreated()).thenReturn(Optional.of(capturingPostCreated)); @@ -99,7 +99,7 @@ public class CreatePostCommandTest { @Test public void verifyThatCreatingAPostDirectedToTheSendingSoneCausesAnError() throws FcpException { - mocks.mockLocalSone("Sone"); + mocks.mockSone("Sone").local().create(); CapturingPostCreated capturingPostCreated = new CapturingPostCreated(); when(mocks.core.postCreated()).thenReturn(Optional.of(capturingPostCreated)); @@ -116,7 +116,7 @@ public class CreatePostCommandTest { @Test(expected = FcpException.class) public void verifyThatCreatingAPostWithoutTextCausesAnError() throws FcpException { - mocks.mockLocalSone("Sone"); + mocks.mockSone("Sone").create(); CapturingPostCreated capturingPostCreated = new CapturingPostCreated(); when(mocks.core.postCreated()).thenReturn(Optional.of(capturingPostCreated)); @@ -128,7 +128,7 @@ public class CreatePostCommandTest { @Test(expected = FcpException.class) public void verifyThatCreatingAPostWithoutSoneCausesAnError() throws FcpException { - mocks.mockLocalSone("Sone"); + mocks.mockSone("Sone").local().create(); CapturingPostCreated capturingPostCreated = new CapturingPostCreated(); when(mocks.core.postCreated()).thenReturn(Optional.of(capturingPostCreated));