Ejemplo n.º 1
0
        public void AddTransactionRange_NoTransactions_NothingAdded()
        {
            var account = new Account();
            var transactions = new List<Transaction>();

            account.AddTransactionRange(transactions);

            CollectionAssert.IsEmpty(account.Transactions);
        }
Ejemplo n.º 2
0
        public void AddTransactionRange_TwoValidTransactions_AddsTwoTransactions()
        {
            var account = new Account();
            var transactions = new List<Transaction>
            {
                new Transaction(),
                new Transaction()
            };

            account.AddTransactionRange(transactions);

            CollectionAssert.AreEquivalent(transactions, account.Transactions);
        }
Ejemplo n.º 3
0
        public void AddTransactionRange_TransactionAlreadyAdded_NotAdded()
        {
            var account = new Account();
            var transactions = new List<Transaction>
            {
                new Transaction()
            };
            account.AddTransaction(transactions[0]);

            account.AddTransactionRange(transactions);

            CollectionAssert.AreEquivalent(transactions, account.Transactions);
        }
Ejemplo n.º 4
0
 public void AddTransactionRange_CalledWithNull_NothingAdded()
 {
     var account = new Account();
     account.AddTransactionRange(null);
     CollectionAssert.IsEmpty(account.Transactions);
 }