Esempio n. 1
0
        public void AddDepositMoreThanWallet()
        {
            PassBookValidate u  = new PassBookValidate();
            DateTime         dt = DateTime.ParseExact("24/10/2019", "dd/MM/yyyy", CultureInfo.InvariantCulture);

            MoneyLover.UI.Models.PassBook abc = new MoneyLover.UI.Models.PassBook {
                BankID = 1, Deposit = 1000000, Term = 1, Due = 2, IndefiniteTerm = 0.07, SentDate = dt
            };
            var r = u.ValidateAddDeposit(1, 200000000, abc);

            Assert.IsFalse(r);
        }
Esempio n. 2
0
        public void AddDepositRight()
        {
            PassBookValidate u  = new PassBookValidate();
            DateTime         dt = DateTime.ParseExact("15/10/2019", "dd/MM/yyyy", CultureInfo.InvariantCulture);
            DateTime         ed = DateTime.ParseExact(DateTime.Now.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);

            MoneyLover.UI.Models.PassBook abc = new MoneyLover.UI.Models.PassBook {
                BankID = 2, Deposit = 2000000, InterestRates = 0.07, IndefiniteTerm = 0.05, SentDate = dt, EndDate = ed, PassBookID = 1, Term = 1, Due = 2
            };
            var r = u.ValidateAddDeposit(1, 1500000, abc);

            Assert.IsTrue(r);
        }