@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); }
@Test public void testSend_Success() throws Exception { doReturn(transactionManager).when(outgoingExtraUserManager).getTransactionManager(); walletModuleCryptoWallet.send( cryptoAmount, destinationAddress, notes, walletPublicKey, deliveredByActorId, deliveredByActorType, deliveredToActorId, deliveredToActorType); }
@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); }