mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Add send more BSQ than in wallet test
This commit is contained in:
parent
848694ad86
commit
b78f3abb29
1 changed files with 20 additions and 0 deletions
|
@ -155,4 +155,24 @@ public class BitcoinjBsqTests {
|
|||
assertThrows(InsufficientMoneyException.class, () ->
|
||||
bsqWalletV2.sendBsq(receiverAddress, receiverAmount, Coin.ofSat(10)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void sendMoreBsqThanInWalletTest() {
|
||||
var bsqWalletV2 = new BsqWalletV2(networkParams,
|
||||
peerGroup,
|
||||
btcWalletV2,
|
||||
bsqWallet,
|
||||
bsqCoinSelector);
|
||||
|
||||
var secondBsqWalletReceivedLatch = new CountDownLatch(1);
|
||||
secondBsqWallet.addCoinsReceivedEventListener((wallet, tx, prevBalance, newBalance) ->
|
||||
secondBsqWalletReceivedLatch.countDown());
|
||||
|
||||
Address receiverAddress = secondBsqWallet.currentReceiveAddress();
|
||||
Coin receiverAmount = bsqWallet.getBalance()
|
||||
.add(Coin.valueOf(100));
|
||||
|
||||
assertThrows(InsufficientMoneyException.class, () ->
|
||||
bsqWalletV2.sendBsq(receiverAddress, receiverAmount, Coin.ofSat(10)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue