Fixed tests

This commit is contained in:
Christian Basler 2016-09-12 10:02:52 +02:00
parent 489b8968e0
commit 71124d7b01
2 changed files with 6 additions and 3 deletions

View File

@ -69,6 +69,8 @@ public class DefaultMessageListenerTest extends TestBase {
when(ctx.getLabeler()).thenReturn(mock(Labeler.class));
listener = new DefaultMessageListener(mock(Labeler.class), mock(BitmessageContext.Listener.class));
when(ctx.getNetworkListener()).thenReturn(listener);
listener.setContext(ctx);
}
@Test

View File

@ -66,6 +66,7 @@ public class ProofOfWorkServiceTest {
when(ctx.getNetworkHandler()).thenReturn(networkHandler);
when(ctx.getMessageRepository()).thenReturn(messageRepo);
when(ctx.getLabeler()).thenReturn(mock(Labeler.class));
when(ctx.getNetworkListener()).thenReturn(mock(NetworkHandler.MessageListener.class));
proofOfWorkService = new ProofOfWorkService();
proofOfWorkService.setContext(ctx);