Пример #1
0
        public void AddSavingBook()
        {
            SavingBookContract saving = new SavingBookContract(ApplicationSettings.GetInstance(""),
                                                               new User()
            {
                Id = 1
            }, new DateTime(2009, 01, 01), _savingsBookProduct, null)
            {
                Code = "S/CR/2009/SAVIN-1/BAR-1", Status = OSavingsStatus.Active, InterestRate = 0.01, FlatWithdrawFees = 3, FlatTransferFees = 3
            };

            saving.InitialAmount = 1000;
            saving.EntryFees     = 10;
            saving.FirstDeposit(1000, new DateTime(2009, 01, 01), null, new User(), Teller.CurrentTeller);

            User user = new User {
                Id = 1
            };

            saving.Events[0].User = user;
            saving.Events[0].Id   = 400;
            saving.SavingsOfficer = user;
            saving.Id             = _savingManager.Add(saving, new Person {
                Id = 6
            });
            _savingEventManager.Add(saving.Events[0], saving.Id);

            SavingBookContract retrievedSaving = (SavingBookContract)_savingManager.Select(saving.Id);

            _compareSavings(saving, retrievedSaving);
        }