コード例 #1
0
        public void GetAccountByNameWithMatchingNameReturnsAccount()
        {
            AccountRoot accountRoot = CreateAccountRootWithHdAccountHavingAddresses("Test", KnownCoinTypes.Stratis);

            HdAccount result = accountRoot.GetAccountByName("Test");

            Assert.NotNull(result);
            Assert.Equal("Test", result.Name);
        }
コード例 #2
0
        public void GetAccountByNameWithNonMatchingNameReturnsNull()
        {
            AccountRoot accountRoot = CreateAccountRootWithHdAccountHavingAddresses("Test", KnownCoinTypes.Stratis);

            Assert.Null(accountRoot.GetAccountByName("test"));
        }
コード例 #3
0
        public void GetAccountByNameWithNonMatchingNameThrowsException()
        {
            AccountRoot accountRoot = CreateAccountRootWithHdAccountHavingAddresses("Test", CoinType.Stratis);

            Assert.Throws <WalletException>(() => { accountRoot.GetAccountByName("test"); });
        }