public void Data_Read_Transactions_By_Account_Date_And_Category()
        {
            var repository = new TransactionRepository(_dataConnectionString, 1);

            var data = repository.GetForAccount(1, 4, new DateTime(2015, 01, 02), new DateTime(2015, 01, 06)).ToList();

            Assert.IsTrue(data.Count == 4);
            Assert.IsTrue(data[0].TransactionID == 14);
            Assert.IsTrue(data[0].Category_CategoryID == 4);
            Assert.IsTrue(data[0].CategoryName == "Bills");
            Assert.IsTrue(data[0].Description == "USER1CURRENT14");
            Assert.IsTrue(data[0].Note == "Water");
            Assert.IsTrue(data[1].TransactionID == 11);
            Assert.IsTrue(data[1].Category_CategoryID == 4);
            Assert.IsTrue(data[1].CategoryName == "Bills");
            Assert.IsTrue(data[1].Description == "USER1CURRENT11");
            Assert.IsTrue(data[1].Note == "Electricity");
            Assert.IsTrue(data[2].TransactionID == 7);
            Assert.IsTrue(data[2].Category_CategoryID == 4);
            Assert.IsTrue(data[2].CategoryName == "Bills");
            Assert.IsTrue(data[2].Description == "USER1CURRENT7");
            Assert.IsTrue(data[2].Note == "Mobile");
            Assert.IsTrue(data[3].TransactionID == 4);
            Assert.IsTrue(data[3].Category_CategoryID == 4);
            Assert.IsTrue(data[3].CategoryName == "Bills");
            Assert.IsTrue(data[3].Description == "USER1CURRENT4");
            Assert.IsTrue(data[3].Note == "Gas");
        }
        public void Data_Read_Transactions_By_Account()
        {
            var repository = new TransactionRepository(_dataConnectionString, 1);

            var data = repository.GetForAccount(1).ToList();

            // There are 15 test transactions for this user (and one deleted) in date descending order
            Assert.IsTrue(data.Count == 15);
            Assert.IsTrue(data[0].TransactionID == 31);
            Assert.IsTrue(data[0].Category_CategoryID == null);
            Assert.IsTrue(data[0].CategoryName == null);
            Assert.IsTrue(data[0].Description == "USER1CURRENT15");
            Assert.IsTrue(data[0].Amount == -5.00M);
            Assert.IsTrue(data[14].TransactionID == 1);
            Assert.IsTrue(data[14].Category_CategoryID == 1);
            Assert.IsTrue(data[14].CategoryName == "Salary");
            Assert.IsTrue(data[14].Description == "USER1CURRENT1");
            Assert.IsTrue(data[14].Amount == 1000.00M);
        }
        public void Data_Read_Transactions_By_Account_And_Date()
        {
            var repository = new TransactionRepository(_dataConnectionString, 1);

            var data = repository.GetForAccount(1, new DateTime(2015, 01, 02), new DateTime(2015, 01, 04)).ToList();

            Assert.IsTrue(data.Count == 7);
            Assert.IsTrue(data[0].TransactionID == 10);
            Assert.IsTrue(data[0].Category_CategoryID == 3);
            Assert.IsTrue(data[0].CategoryName == "Food");
            Assert.IsTrue(data[0].Description == "USER1CURRENT10");
            Assert.IsTrue(data[0].Note == null);
            Assert.IsTrue(data[6].TransactionID == 4);
            Assert.IsTrue(data[6].Category_CategoryID == 4);
            Assert.IsTrue(data[6].CategoryName == "Bills");
            Assert.IsTrue(data[6].Description == "USER1CURRENT4");
            Assert.IsTrue(data[6].Note == "Gas");
        }
        public void Data_Read_Other_User_Transactions_By_Account()
        {
            var repository = new TransactionRepository(_dataConnectionString, 1);

            var data = repository.GetForAccount(5).ToList();

            Assert.IsTrue(data.Count == 0);
        }