public void Data_Read_Other_User_Category_Budget()
        {
            var repository = new Category_BudgetRepository(_dataConnectionString, 1);

            var data = repository.Get(4, 9);

            Assert.IsTrue(data == null);
        }
        public void Data_Delete_Category_Budget()
        {
            var repository = new Category_BudgetRepository(_dataConnectionString, 1);

            var result = repository.Delete(1, 3);

            var category = repository.Get(1, 3);

            Assert.IsTrue(category == null);
            Assert.IsTrue(result.Deleted == true);
            Assert.IsTrue(result.DeletedBy == 1);
            Assert.IsTrue(result.DeletedDate.Value.Date == DateTime.Now.Date);
        }
        public void Data_Read_Category_Budget()
        {
            var repository = new Category_BudgetRepository(_dataConnectionString, 1);

            var data = repository.Get(1, 2);

            Assert.IsTrue(data.Budget_BudgetID == 1);
            Assert.IsTrue(data.Category_CategoryID == 2);
            Assert.IsTrue(data.CategoryName == "Rent");
            Assert.IsTrue(data.CategoryType == CategoryType.Expense);
            Assert.IsTrue(data.Amount == 500.00M);
        }
        public void Data_Update_Category_Budget()
        {
            var repository = new Category_BudgetRepository(_dataConnectionString, 1);

            var category = repository.Get(1, 2);

            category.Amount = 123.45M;

            var result = repository.Update(category);

            Assert.IsTrue(result.Budget_BudgetID == 1);
            Assert.IsTrue(result.Category_CategoryID == 2);
            Assert.IsTrue(result.CategoryName == "Rent");
            Assert.IsTrue(result.CategoryType == CategoryType.Expense);
            Assert.IsTrue(result.Amount == 123.45M);
            Assert.IsTrue(result.LastModifiedBy == 1);
            Assert.IsTrue(result.LastModifiedDate.Date == DateTime.Now.Date);
        }