Exemplo n.º 1
0
        public void UpdateLoanStatus()
        {
            _loan.ContractStatus        = OContractStatus.Active;
            _loan.CreditCommiteeDate    = new DateTime(2009, 1, 1);
            _loan.CreditCommiteeComment = "NotSet";

            _loan.Id = _loanManager.Add(_loan, 1);

            _loan.ContractStatus        = OContractStatus.Validated;
            _loan.CreditCommiteeDate    = new DateTime(2009, 2, 2);
            _loan.CreditCommiteeComment = "NotSet2";

            _loanManager.UpdateLoanStatus(_loan);

            Loan updatedLoan = _loanManager.SelectLoan(_loan.Id, true, true, true);

            Assert.AreEqual(OContractStatus.Validated, updatedLoan.ContractStatus);
            Assert.AreEqual(new DateTime(2009, 2, 2), updatedLoan.CreditCommiteeDate);
            Assert.AreEqual("NotSet2", updatedLoan.CreditCommiteeComment);
        }