Fixed tests

This commit is contained in:
Christian Basler 2015-12-12 11:05:13 +01:00
parent ab6a3c56dd
commit 51bf3b8bd2
3 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import ch.dissem.bitmessage.entity.valueobject.NetworkAddress;
import ch.dissem.bitmessage.ports.AddressRepository; import ch.dissem.bitmessage.ports.AddressRepository;
import ch.dissem.bitmessage.ports.MessageRepository; import ch.dissem.bitmessage.ports.MessageRepository;
import ch.dissem.bitmessage.ports.NetworkHandler; import ch.dissem.bitmessage.ports.NetworkHandler;
import ch.dissem.bitmessage.ports.ProofOfWorkRepository;
import ch.dissem.bitmessage.security.bc.BouncySecurity; import ch.dissem.bitmessage.security.bc.BouncySecurity;
import ch.dissem.bitmessage.utils.Property; import ch.dissem.bitmessage.utils.Property;
import org.junit.AfterClass; import org.junit.AfterClass;
@ -54,6 +55,7 @@ public class NetworkHandlerTest {
.addressRepo(Mockito.mock(AddressRepository.class)) .addressRepo(Mockito.mock(AddressRepository.class))
.inventory(peerInventory) .inventory(peerInventory)
.messageRepo(Mockito.mock(MessageRepository.class)) .messageRepo(Mockito.mock(MessageRepository.class))
.powRepo(Mockito.mock(ProofOfWorkRepository.class))
.port(6001) .port(6001)
.nodeRegistry(new TestNodeRegistry()) .nodeRegistry(new TestNodeRegistry())
.networkHandler(new DefaultNetworkHandler()) .networkHandler(new DefaultNetworkHandler())
@ -68,6 +70,7 @@ public class NetworkHandlerTest {
.addressRepo(Mockito.mock(AddressRepository.class)) .addressRepo(Mockito.mock(AddressRepository.class))
.inventory(nodeInventory) .inventory(nodeInventory)
.messageRepo(Mockito.mock(MessageRepository.class)) .messageRepo(Mockito.mock(MessageRepository.class))
.powRepo(Mockito.mock(ProofOfWorkRepository.class))
.port(6002) .port(6002)
.nodeRegistry(new TestNodeRegistry(localhost)) .nodeRegistry(new TestNodeRegistry(localhost))
.networkHandler(networkHandler) .networkHandler(networkHandler)

View File

@ -39,6 +39,7 @@ public class WifExporterTest {
.networkHandler(mock(NetworkHandler.class)) .networkHandler(mock(NetworkHandler.class))
.inventory(mock(Inventory.class)) .inventory(mock(Inventory.class))
.messageRepo(mock(MessageRepository.class)) .messageRepo(mock(MessageRepository.class))
.powRepo(mock(ProofOfWorkRepository.class))
.nodeRegistry(mock(NodeRegistry.class)) .nodeRegistry(mock(NodeRegistry.class))
.addressRepo(repo) .addressRepo(repo)
.build(); .build();

View File

@ -42,6 +42,7 @@ public class WifImporterTest {
.networkHandler(mock(NetworkHandler.class)) .networkHandler(mock(NetworkHandler.class))
.inventory(mock(Inventory.class)) .inventory(mock(Inventory.class))
.messageRepo(mock(MessageRepository.class)) .messageRepo(mock(MessageRepository.class))
.powRepo(mock(ProofOfWorkRepository.class))
.nodeRegistry(mock(NodeRegistry.class)) .nodeRegistry(mock(NodeRegistry.class))
.addressRepo(repo) .addressRepo(repo)
.build(); .build();