Exemple #1
0
        public void InterpretShortNotation_NullShortNotation_InvalidWalletPart()
        {
            var walletPart = new WalletPart();

            var result = walletPart.InterpretShortNotation(null);

            Assert.IsFalse(result);
        }
Exemple #2
0
        public void InterpretShortNotation_TooLongShortNotation_InvalidWalletPart()
        {
            var invalidShortNotation = "1|4|5edb71e0-ac40-40a3-a22d-70220058eba5|1111|2222|3333";

            var walletPart = new WalletPart();

            var result = walletPart.InterpretShortNotation(invalidShortNotation);

            Assert.IsFalse(result);
        }
Exemple #3
0
        public void InterpretShortNotation_TruncatedInvalidShortNotation_InvalidWalletPart()
        {
            var validShortNotation = "1|4|5edb71e0-ac40-40a3-a22d-70220058eba5";

            var walletPart = new WalletPart();

            var result = walletPart.InterpretShortNotation(validShortNotation);

            Assert.IsFalse(result);
        }
Exemple #4
0
        public void InterpretShortNotation_ValidShortNotation_ValidWalletPart()
        {
            var validShortNotation = "1|2|4|5edb71e0-ac40-40a3-a22d-70220058eba5";

            var walletPart = new WalletPart();

            var result = walletPart.InterpretShortNotation(validShortNotation);

            Assert.IsTrue(result);
            Assert.That(walletPart.Signature.Version, Is.EqualTo(1));
            Assert.That(walletPart.Signature.PartsThreshold, Is.EqualTo(2));
            Assert.That(walletPart.Signature.PartsTotal, Is.EqualTo(4));
            Assert.That(walletPart.Data, Is.EqualTo("5edb71e0-ac40-40a3-a22d-70220058eba5"));
        }