public void ContainsTransaction_ReturnsTrue_WhenTransactionMatchesChainblockTransaction()
        {
            ITransaction transaction = CreateTransaction(1);

            chainblock.Add(transaction);

            ITransaction duplicateTransaction = CreateTransaction(1);

            Assert.That(chainblock.Contains(duplicateTransaction), Is.True);
        }
Esempio n. 2
0
        public void Add_Should_AddTransaction()
        {
            int initialCount = chainblock.Count;

            chainblock.Add(simpleTransaction);
            int expectedCount = initialCount + 1;

            Assert.AreEqual(expectedCount, chainblock.Count);
            Assert.That(chainblock.Contains(simpleTransaction.Id), Is.True);
        }
 public void ContainsShouldReturnTrueWhenTransactionExists()
 {
     chainBlock.Add(validTransaction);
     Assert.AreEqual(true, chainBlock.Contains(1));
 }