Search in sources :

Example 1 with PrivateTransactionGroupResult

use of org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.privacy.PrivateTransactionGroupResult in project besu by hyperledger.

the class PrivGetPrivateTransactionTest method returnsPrivateTransactionGroup.

@Test
public void returnsPrivateTransactionGroup() {
    final PrivateTransaction privateTransaction = PrivateTransactionDataFixture.privateTransactionBesu();
    final ExecutedPrivateTransaction executedPrivateTransaction = createExecutedPrivateTransaction(privateTransaction);
    when(privacyController.findPrivateTransactionByPmtHash(any(), any())).thenReturn(Optional.of(executedPrivateTransaction));
    final PrivateTransactionGroupResult expectedResult = new PrivateTransactionGroupResult(privateTransaction);
    final JsonRpcRequestContext request = createRequestContext();
    final PrivateTransactionResult result = makeRequest(request);
    assertThat(result).usingRecursiveComparison().isEqualTo(expectedResult);
}
Also used : PrivateTransaction(org.hyperledger.besu.ethereum.privacy.PrivateTransaction) ExecutedPrivateTransaction(org.hyperledger.besu.ethereum.privacy.ExecutedPrivateTransaction) PrivateTransactionResult(org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.privacy.PrivateTransactionResult) JsonRpcRequestContext(org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext) ExecutedPrivateTransaction(org.hyperledger.besu.ethereum.privacy.ExecutedPrivateTransaction) PrivateTransactionGroupResult(org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.privacy.PrivateTransactionGroupResult) Test(org.junit.Test)

Aggregations

JsonRpcRequestContext (org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext)1 PrivateTransactionGroupResult (org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.privacy.PrivateTransactionGroupResult)1 PrivateTransactionResult (org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.privacy.PrivateTransactionResult)1 ExecutedPrivateTransaction (org.hyperledger.besu.ethereum.privacy.ExecutedPrivateTransaction)1 PrivateTransaction (org.hyperledger.besu.ethereum.privacy.PrivateTransaction)1 Test (org.junit.Test)1