Exemplo n.º 1
0
  @Ignore
  @Test(expected = CantSendCryptoException.class)
  public void testSend_InsufficientFundsException() throws Exception {
    doReturn(transactionManager).when(outgoingExtraUserManager).getTransactionManager();
    doThrow(
            new InsufficientFundsException(
                InsufficientFundsException.DEFAULT_MESSAGE, null, null, null))
        .when(transactionManager)
        .send(
            anyString(),
            any(CryptoAddress.class),
            anyLong(),
            anyString(),
            anyString(),
            any(Actors.class),
            anyString(),
            any(Actors.class));

    walletModuleCryptoWallet.send(
        cryptoAmount,
        destinationAddress,
        notes,
        walletPublicKey,
        deliveredByActorId,
        deliveredByActorType,
        deliveredToActorId,
        deliveredToActorType);
  }
Exemplo n.º 2
0
 @Test
 public void testSend_Success() throws Exception {
   doReturn(transactionManager).when(outgoingExtraUserManager).getTransactionManager();
   walletModuleCryptoWallet.send(
       cryptoAmount,
       destinationAddress,
       notes,
       walletPublicKey,
       deliveredByActorId,
       deliveredByActorType,
       deliveredToActorId,
       deliveredToActorType);
 }
Exemplo n.º 3
0
  @Test(expected = CantSendCryptoException.class)
  public void testSend_CantGetTransactionManagerException() throws Exception {
    doThrow(
            new CantGetTransactionManagerException(
                CantGetTransactionManagerException.DEFAULT_MESSAGE, null, null, null))
        .when(outgoingExtraUserManager)
        .getTransactionManager();

    walletModuleCryptoWallet.send(
        cryptoAmount,
        destinationAddress,
        notes,
        walletPublicKey,
        deliveredByActorId,
        deliveredByActorType,
        deliveredToActorId,
        deliveredToActorType);
  }