public void UnspentAmountConfirmedOnlyGivenNoSpendingDetailsReturnsZero() { var transaction = new TransactionOutputData { SpendingDetails = null }; Money result = transaction.GetUnspentAmount(true); Assert.Equal(Money.Zero, result); }
public void UnspentAmountNotConfirmedOnlyGivenNoSpendingDetailsReturnsTransactionAmount() { var transaction = new TransactionOutputData { SpendingDetails = null, Amount = new Money(15) }; Money result = transaction.GetUnspentAmount(false); Assert.Equal(new Money(15), result); }
public void UnspentAmountConfirmedOnlyGivenBeingUnConfirmedAndSpentUnconfirmedReturnsZero() { var transaction = new TransactionOutputData { SpendingDetails = new SpendingDetails(), Amount = new Money(15), }; Money result = transaction.GetUnspentAmount(true); Assert.Equal(Money.Zero, result); }
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); }
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); }