Exemplo n.º 1
0
        public static void DeleteAccountTest()
        {
            Wallet        wallet        = Wallet.FromJson(walletJson);
            WalletManager walletManager = new WalletManager(wallet);

            var createdAccount = walletManager.CreateAccount("Test Account");

            walletManager.AddAccount(createdAccount);
            walletManager.DeleteAccount(createdAccount);

            Assert.DoesNotContain(createdAccount, wallet.Accounts);
        }
Exemplo n.º 2
0
        public static void DeleteAccountByAddressTest()
        {
            Wallet        wallet        = Wallet.FromJson(walletJson);
            WalletManager walletManager = new WalletManager(wallet);

            var scriptHash      = "AQLASLtT6pWbThcSCYU1biVqhMnzhTgLFq".ToScriptHash();
            var accountToDelete = new Account(scriptHash);

            walletManager.AddAccount(accountToDelete);
            walletManager.DeleteAccount("AQLASLtT6pWbThcSCYU1biVqhMnzhTgLFq");

            Assert.DoesNotContain(accountToDelete, wallet.Accounts);
        }