Пример #1
0
        public void UpdateLoan_AddAGuarantor_NoCollateral()
        {
            _loan.Guarantors = new List <Guarantor> {
                new Guarantor {
                    Tiers = new Person {
                        Id = 1
                    }, Amount = 1000
                }
            };
            _loan.Id = _loanManager.Add(_loan, 1);

            _loan.Guarantors.Add(new Guarantor {
                Tiers = new Person {
                    Id = 2
                }, Amount = 600
            });
            _loanManager.UpdateLoan(_loan);

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

            Assert.AreEqual(2, updatedLoan.Guarantors.Count);
        }