示例#1
0
        public void AddTransactionRange_NoTransactions_NothingAdded()
        {
            var account = new Account();
            var transactions = new List<Transaction>();

            account.AddTransactionRange(transactions);

            CollectionAssert.IsEmpty(account.Transactions);
        }
示例#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);
        }
示例#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);
        }
示例#4
0
 public void AddTransactionRange_CalledWithNull_NothingAdded()
 {
     var account = new Account();
     account.AddTransactionRange(null);
     CollectionAssert.IsEmpty(account.Transactions);
 }