@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.<PostCreated>of(capturingPostCreated));
@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.<PostCreated>of(capturingPostCreated));
@Test
public void verifyThatCreatingAPostDirectedToTheSendingSoneCausesAnError() throws FcpException {
- mocks.mockLocalSone("Sone");
+ mocks.mockSone("Sone").local().create();
CapturingPostCreated capturingPostCreated = new CapturingPostCreated();
when(mocks.core.postCreated()).thenReturn(Optional.<PostCreated>of(capturingPostCreated));
@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.<PostCreated>of(capturingPostCreated));
@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.<PostCreated>of(capturingPostCreated));