Пример #1
0
        public void UnspentAmountConfirmedOnlyGivenNoSpendingDetailsReturnsZero()
        {
            var transaction = new TransactionOutputData
            {
                SpendingDetails = null
            };

            Money result = transaction.GetUnspentAmount(true);

            Assert.Equal(Money.Zero, result);
        }
Пример #2
0
        public void UnspentAmountNotConfirmedOnlyGivenNoSpendingDetailsReturnsTransactionAmount()
        {
            var transaction = new TransactionOutputData
            {
                SpendingDetails = null,
                Amount          = new Money(15)
            };

            Money result = transaction.GetUnspentAmount(false);

            Assert.Equal(new Money(15), result);
        }
Пример #3
0
        public void UnspentAmountConfirmedOnlyGivenBeingUnConfirmedAndSpentUnconfirmedReturnsZero()
        {
            var transaction = new TransactionOutputData
            {
                SpendingDetails = new SpendingDetails(),
                Amount          = new Money(15),
            };

            Money result = transaction.GetUnspentAmount(true);

            Assert.Equal(Money.Zero, result);
        }
Пример #4
0
        public void UnspentAmountConfirmedOnlyGivenSpendableAndConfirmedReturnsAmount()
        {
            var transaction = new TransactionOutputData
            {
                SpendingDetails = null,
                Amount          = new Money(15),
                BlockHeight     = 15
            };

            Money result = transaction.GetUnspentAmount(true);

            Assert.Equal(new Money(15), result);
        }
Пример #5
0
        public void UnspentAmountNotConfirmedOnlyGivenBeingConfirmedAndSpentConfirmedReturnsZero()
        {
            var transaction = new TransactionOutputData
            {
                SpendingDetails = new SpendingDetails {
                    BlockHeight = 16
                },
                Amount      = new Money(15),
                BlockHeight = 15
            };

            Money result = transaction.GetUnspentAmount(false);

            Assert.Equal(Money.Zero, result);
        }