public async void ArchiveAddress_NullAddress_ArgumentNullException() { await Assert.ThrowsAsync <ArgumentNullException>(async() => { using (BlockchainApiHelper apiHelper = UnitTestUtil.GetFakeHelper()) { WalletHelper walletHelper = this.GetWalletHelper(apiHelper); await walletHelper.ArchiveAddress(null); } }); }
public async void ArchiveAddress_BaddAddress_ServerApiException() { 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); await walletHelper.ArchiveAddress("badAddress"); } }); Assert.Contains("Checksum", apiException.Message); }
public async void NewAddress_ArchiveThenConsolidate_Valid() { using (BlockchainApiHelper apiHelper = new BlockchainApiHelper()) { WalletHelper walletHelper = apiHelper.CreateWalletHelper(WalletTests.WALLET_ID, WalletTests.WALLET_PASSWORD, WalletTests.WALLET_PASSWORD2); Address address = await walletHelper.NewAddress("Test"); Assert.NotNull(address); string archivedAddress = await walletHelper.ArchiveAddress(address.AddressStr); Assert.NotNull(archivedAddress); string unarchivedAddress = await walletHelper.UnarchiveAddress(archivedAddress); Assert.NotNull(unarchivedAddress); } }