Search in sources :

Example 16 with TransactionManager

use of com.quorum.tessera.transaction.TransactionManager in project tessera by ConsenSys.

the class P2PRestAppTest method setUp.

@Before
public void setUp() {
    runtimeContext = mock(RuntimeContext.class);
    enclave = mock(Enclave.class);
    discovery = mock(Discovery.class);
    partyStore = mock(PartyStore.class);
    transactionManager = mock(TransactionManager.class);
    batchResendManager = mock(BatchResendManager.class);
    legacyResendManager = mock(LegacyResendManager.class);
    privacyGroupManager = mock(PrivacyGroupManager.class);
    p2PRestApp = new P2PRestApp(discovery, enclave, partyStore, transactionManager, batchResendManager, legacyResendManager, privacyGroupManager);
    Client client = mock(Client.class);
    when(runtimeContext.getP2pClient()).thenReturn(client);
    when(runtimeContext.isRemoteKeyValidation()).thenReturn(true);
    when(runtimeContext.getPeers()).thenReturn(List.of(peerUri));
}
Also used : BatchResendManager(com.quorum.tessera.recovery.workflow.BatchResendManager) PrivacyGroupManager(com.quorum.tessera.privacygroup.PrivacyGroupManager) Enclave(com.quorum.tessera.enclave.Enclave) TransactionManager(com.quorum.tessera.transaction.TransactionManager) PartyStore(com.quorum.tessera.p2p.partyinfo.PartyStore) Discovery(com.quorum.tessera.discovery.Discovery) LegacyResendManager(com.quorum.tessera.recovery.workflow.LegacyResendManager) RuntimeContext(com.quorum.tessera.context.RuntimeContext) Client(jakarta.ws.rs.client.Client) Before(org.junit.Before)

Aggregations

TransactionManager (com.quorum.tessera.transaction.TransactionManager)16 Logger (org.slf4j.Logger)9 LoggerFactory (org.slf4j.LoggerFactory)9 MessageHash (com.quorum.tessera.data.MessageHash)8 PrivacyMode (com.quorum.tessera.enclave.PrivacyMode)8 PublicKey (com.quorum.tessera.encryption.PublicKey)8 PrivacyGroupManager (com.quorum.tessera.privacygroup.PrivacyGroupManager)8 Response (jakarta.ws.rs.core.Response)8 java.util (java.util)8 Stream (java.util.stream.Stream)8 Operation (io.swagger.v3.oas.annotations.Operation)7 Content (io.swagger.v3.oas.annotations.media.Content)7 Schema (io.swagger.v3.oas.annotations.media.Schema)7 ApiResponse (io.swagger.v3.oas.annotations.responses.ApiResponse)7 Tag (io.swagger.v3.oas.annotations.tags.Tag)7 Valid (jakarta.validation.Valid)7 NotNull (jakarta.validation.constraints.NotNull)7 Collectors (java.util.stream.Collectors)7 URI (java.net.URI)6 PrivacyValid (com.quorum.tessera.api.constraint.PrivacyValid)5