Exemplo n.º 1
0
        public void UnspentAmountConfirmedOnlyGivenNoSpendingDetailsReturnsZero()
        {
            var transaction = new TransactionOutputData
            {
                SpendingDetails = null
            };

            Money result = transaction.GetUnspentAmount(true);

            Assert.Equal(Money.Zero, result);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }