Beispiel #1
0
        public void Get_ExpensesMonthly_Just_Good()
        {
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();

            var et = context.ExpensesMonthly.ToList();

            Assert.NotEqual(0, et.Count());
        }
Beispiel #2
0
        public void TestGetTotaAmountsPerPeriod_Just_Good()
        {
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();

            var rep = new ExpensesRepository(context, null);

            var exp = rep.GetTotaAmountsPerPeriod(DateTime.Now);

            Assert.Equal(0, exp);
        }
Beispiel #3
0
        public void Get_ExpensesWithType_Just_Good()
        {
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();

            var et = context.ExpensesEntity.Include(x => x.Type).ToList();

            ExpensesType newType = new ExpensesType();

            Assert.Equal(newType.GetType(), et.Select(x => x.Type).FirstOrDefault().GetType());
        }
Beispiel #4
0
        public void Get_Expenses_Just_Good()
        {
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();

            var rep = new ExpensesRepository(context, null);

            var exp = rep.GetAllExpenses();

            Assert.NotEqual(0, exp.Count());
        }
Beispiel #5
0
        public void Get_ExpensesMonthlyWithType_Just_Good()
        {
            //Facts
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();
            var et           = context.ExpensesMonthly.Include(x => x.Type).ToList();

            //Arrangement
            ExpensesType newType = new ExpensesType();

            Assert.Equal(newType.GetType(), et.Select(x => x.Type).FirstOrDefault().GetType());
        }
Beispiel #6
0
        public void Test_Get_Avarage_Amount_Just_Good()
        {
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();

            var rep = new ExpensesRepository(context, null);

            var idPais = 1;

            var exp = rep.GetAvarageAmountByCountry(idPais);

            Assert.NotEqual(0, exp);
        }
Beispiel #7
0
        public void Get_ExpensesByPeriod_Just_Good()
        {
            var getDbContext = new GetDbContextDAL();
            var context      = getDbContext.ReturnDbContext();

            var rep = new ExpensesRepository(context, null);

            var period = Convert.ToDateTime("2016-11-01");

            //var exp = rep.GetExpensesByPeriod(period).Where(x => x.ExpenseDate.Value.Month != period.Month && x.ExpenseDate.Value.Year != period.Year);

            //Assert.Equal(0, exp.Count());
        }