use of com.radixdlt.api.core.openapitools.model.MempoolTransactionRequest in project radixdlt by radixdlt.
the class MempoolTransactionHandlerTest method retrieving_invalid_hash_should_throw.
@Test
public void retrieving_invalid_hash_should_throw() throws Exception {
// Arrange
start();
// Act
var request = new MempoolTransactionRequest().networkIdentifier(new NetworkIdentifier().network("localnet")).transactionIdentifier(new TransactionIdentifier().hash("badbad"));
var response = handleRequestWithExpectedResponse(sut, request, UnexpectedError.class);
// Assert
assertThat(response.getDetails()).isInstanceOf(InvalidTransactionHashError.class);
}
use of com.radixdlt.api.core.openapitools.model.MempoolTransactionRequest in project radixdlt by radixdlt.
the class MempoolTransactionHandlerTest method retrieving_transaction_not_in_mempool_should_throw.
@Test
public void retrieving_transaction_not_in_mempool_should_throw() throws Exception {
// Arrange
start();
var accountAddress = REAddr.ofPubKeyAccount(self);
var otherAddress = REAddr.ofPubKeyAccount(PrivateKeys.ofNumeric(2).getPublicKey());
var signedTxn = buildSignedTxn(accountAddress, otherAddress);
// Act
var request = new MempoolTransactionRequest().networkIdentifier(new NetworkIdentifier().network("localnet")).transactionIdentifier(coreModelMapper.transactionIdentifier(signedTxn.getId()));
var response = handleRequestWithExpectedResponse(sut, request, UnexpectedError.class);
// Assert
assertThat(response.getDetails()).isInstanceOf(TransactionNotFoundError.class);
}
Aggregations