Ejemplo n.º 1
0
        public void GetCoinTypeWithoutHdPathThrowsArgumentNullException()
        {
            Assert.Throws <ArgumentNullException>(() =>
            {
                var account    = new HdAccount();
                account.HdPath = null;

                account.GetCoinType();
            });
        }
Ejemplo n.º 2
0
        public void GetCoinTypeWithEmptyHdPathThrowsArgumentException()
        {
            Assert.Throws <ArgumentException>(() =>
            {
                var account    = new HdAccount();
                account.HdPath = string.Empty;

                account.GetCoinType();
            });
        }
Ejemplo n.º 3
0
        public void GetCoinTypeWithInvalidHdPathThrowsFormatException()
        {
            Assert.Throws <FormatException>(() =>
            {
                var account    = new HdAccount();
                account.HdPath = "1/";

                account.GetCoinType();
            });
        }
Ejemplo n.º 4
0
        public void GetCoinTypeHavingHdPathReturnsCointType()
        {
            var account = new HdAccount();

            account.HdPath = "1/2/105";

            int result = account.GetCoinType();

            Assert.Equal(KnownCoinTypes.Stratis, result);
        }
Ejemplo n.º 5
0
        public void GetCoinTypeHavingHdPathReturnsCoinType()
        {
            var account = new HdAccount();

            account.HdPath = "1/2/105105";

            CoinType result = account.GetCoinType();

            Assert.Equal(CoinType.Strax, result);
        }
        public void GetCoinTypeWithEmptyHdPathThrowsException()
        {
            Assert.Throws <InvalidOperationException>(() =>
            {
                var account    = new HdAccount();
                account.HdPath = string.Empty;

                account.GetCoinType();
            });
        }
        public void GetCoinTypeWithoutHdPathThrowsException()
        {
            Assert.Throws <InvalidOperationException>(() =>
            {
                var account    = new HdAccount();
                account.HdPath = null;

                account.GetCoinType();
            });
        }