Ejemplo n.º 1
0
        public void GenerateWalletFail()
        {
            string    badMasterKeyWIF = "5KRYM46bcstckRxtdDdBZTshjxtpWtTNBDXKcNWC7yjiGhnuBzV";
            Hashtable walletData      = new Hashtable();

            walletData.Add("id", _wallet.Id);
            walletData.Add("name", _wallet.Name);
            walletData.Add("description", _wallet.Description);
            walletData.Add("masterkey", badMasterKeyWIF);
            walletData.Add("network", _wallet.NetworkChoice.ToString());

            Assert.Throws <FormatException>(() => WalletGenerator.GenerateWalletFromFile(walletData));
        }
Ejemplo n.º 2
0
        public void GenerateWallet()
        {
            Hashtable walletData = new Hashtable();

            walletData.Add("id", _wallet.Id);
            walletData.Add("name", _wallet.Name);
            walletData.Add("description", _wallet.Description);
            walletData.Add("masterkey", _wallet.MasterKeyWIF);
            walletData.Add("network", _wallet.NetworkChoice.ToString());
            IWallet result = WalletGenerator.GenerateWalletFromFile(walletData);

            Assert.AreEqual(result.Id, _wallet.Id);
            Assert.AreEqual(result.Name, _wallet.Name);
            Assert.AreEqual(result.Description, _wallet.Description);
            Assert.AreEqual(result.MasterKeyWIF, _wallet.MasterKeyWIF);
            Assert.AreEqual(result.NetworkChoice, _wallet.NetworkChoice);
        }