@Test
public void verifyThatCreatingAFullySpecifiedReplyWorks() throws FcpException {
- Sone sone = mocks.mockLocalSone("SoneId");
+ Sone sone = mocks.mockSone("SoneId").local().create();
mocks.mockPost(sone, "PostId");
CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));
@Test(expected = FcpException.class)
public void verifyThatCreatingAReplyWithoutSoneCausesAnError() throws FcpException {
- Sone sone = mocks.mockLocalSone("SoneId");
+ Sone sone = mocks.mockSone("SoneId").local().create();
mocks.mockPost(sone, "PostId");
CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));
@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()
@Test(expected = FcpException.class)
public void verifyThatCreatingAReplyWithoutTextCausesAnError() throws FcpException {
- Sone sone = mocks.mockLocalSone("SoneId");
+ Sone sone = mocks.mockSone("SoneId").local().create();
mocks.mockPost(sone, "PostId");
CapturingPostReplyCreated capturingPostReplyCreated = new CapturingPostReplyCreated();
when(mocks.core.postReplyCreated()).thenReturn(Optional.<PostReplyCreated>of(capturingPostReplyCreated));