public async void SendPayment_SendMultiBtc_NoFreeOutputs() { ServerApiException apiException = await Assert.ThrowsAsync <ServerApiException>(async() => { using (BlockchainApiHelper apiHelper = new BlockchainApiHelper()) { WalletHelper walletHelper = apiHelper.CreateWalletHelper(WalletTests.WALLET_ID, WalletTests.WALLET_PASSWORD, WalletTests.WALLET_PASSWORD2); Dictionary <string, BitcoinValue> recipients = new Dictionary <string, BitcoinValue>() { { "17VYDFsDxBMovM1cKGEytgeqdijNcr4L5", BitcoinValue.FromBtc(1) } }; await walletHelper.SendManyAsync(recipients); } }); Assert.Contains("No free", apiException.Message); }
public async void SendMany_NullReeipients_ArgumentNUllException() { await Assert.ThrowsAsync <ArgumentException>(async() => { using (BlockchainApiHelper apiHelper = UnitTestUtil.GetFakeHelper()) { WalletHelper walletHelper = this.GetWalletHelper(apiHelper); await walletHelper.SendManyAsync(null); } }); await Assert.ThrowsAsync <ArgumentException>(async() => { using (BlockchainApiHelper apiHelper = UnitTestUtil.GetFakeHelper()) { WalletHelper walletHelper = this.GetWalletHelper(apiHelper); await walletHelper.SendManyAsync(new Dictionary <string, BitcoinValue>()); } }); }