Esempio n. 1
0
 public TellerManager()
 {
     accountManager = new AccountManager();
     branchManager = new BranchManager();
     userManager = new UserManager();
     currencyManager = new CurrencyManager();
 }
Esempio n. 2
0
 public TellerManager(string pTestDb)
     : base(pTestDb)
 {
     accountManager = new AccountManager(pTestDb);
     branchManager = new BranchManager(pTestDb);
     userManager = new UserManager(pTestDb);
     currencyManager = new CurrencyManager(pTestDb);
 }
Esempio n. 3
0
 public TellerManager(User user)
     : base(user)
 {
     accountManager = new AccountManager(user);
     branchManager = new BranchManager(user);
     userManager = new UserManager(user);
     currencyManager = new CurrencyManager(user);
 }
Esempio n. 4
0
 public PaymentMethodManager(string testDb)
     : base(testDb)
 {
     _branchManager = new BranchManager(testDb);
     _accountManager = new AccountManager(testDb);
 }
Esempio n. 5
0
 public PaymentMethodManager(User user)
     : base(user)
 {
     _branchManager = new BranchManager(user);
     _accountManager = new AccountManager(user);
 }
Esempio n. 6
0
 public BranchService(User user)
 {
     _manager = new BranchManager(user);
 }
Esempio n. 7
0
        public void TestSaveGroup()
        {
            AddDataForTestingTransaction addDataForTesting = new AddDataForTestingTransaction();
            clientManagement = new ClientManager(DataUtil.TESTDB);
            clientServices = new ClientServices(clientManagement);
            branchManager = new BranchManager(DataUtil.TESTDB);
            //List<Branch> branchs = branchManager.SelectAll();

            DeleteAllData();
            Person leader = addDataForTesting.AddPerson();
            Person members = addDataForTesting.AddPersonBis();
            Person membersTer = addDataForTesting.AddPersonTer();
            Person membersQuater = addDataForTesting.AddPersonQuater();
            Group group = new Group
                              {
                                  Active = true,
                                  City = "Dushambe",
                                  District = leader.District,
                                  Name = "SCG",
                                  LoanCycle = 4,
                                  Leader = new Member { Tiers = leader, LoanShareAmount = 1000, CurrentlyIn = true, IsLeader = true, JoinedDate = TimeProvider.Today },
                                  Branch = _branch
                              };
            group.AddMember(new Member { Tiers = members, LoanShareAmount = 200, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = membersTer, LoanShareAmount = 400, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = membersQuater, LoanShareAmount = 700, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });

            Assert.AreEqual(String.Empty, clientServices.SaveSolidarityGroup(ref group));
        }
 public PaymentMethodManager(string testDb) : base(testDb)
 {
     _branchManager  = new BranchManager(testDb);
     _accountManager = new AccountManager(testDb);
     InitCache();
 }
 public PaymentMethodManager(User user) : base(user)
 {
     _branchManager  = new BranchManager(user);
     _accountManager = new AccountManager(user);
     InitCache();
 }
Esempio n. 10
0
 public BranchService()
 {
     _manager = new BranchManager();
 }
Esempio n. 11
0
        public void TestSaveGroupWhenCityIsNotMandatory()
        {
            AddDataForTestingTransaction addDataForTesting = new AddDataForTestingTransaction();
            clientManagement = new ClientManager(DataUtil.TESTDB);
            clientServices = new ClientServices(clientManagement);
            branchManager = new BranchManager(DataUtil.TESTDB);
            //List<Branch> branchs = branchManager.SelectAll();

            ApplicationSettings dataParam = ApplicationSettings.GetInstance("");
            dataParam.DeleteAllParameters();
            dataParam.AddParameter(OGeneralSettings.GROUPMINMEMBERS, 4);
            dataParam.AddParameter(OGeneralSettings.GROUPMAXMEMBERS, 10);
            dataParam.AddParameter(OGeneralSettings.CITYMANDATORY, false);
            DeleteAllData();

            Person leader = addDataForTesting.AddPerson();
            Person members = addDataForTesting.AddPersonBis();
            Person membersTer = addDataForTesting.AddPersonTer();
            Person membersQuater = addDataForTesting.AddPersonQuater();
            Group group = new Group
                              {
                                  Active = true,
                                  City = null,
                                  District = leader.District,
                                  Name = "SCG",
                                  Leader = new Member { Tiers = leader, LoanShareAmount = 1000, CurrentlyIn = true, IsLeader = true, JoinedDate = TimeProvider.Today },
                                  LoanCycle = 3,
                                  Branch = _branch
                              };

            group.AddMember(new Member { Tiers = members, LoanShareAmount = 200, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = membersTer, LoanShareAmount = 400, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });
            group.AddMember(new Member { Tiers = membersQuater, LoanShareAmount = 700, CurrentlyIn = true, IsLeader = false, JoinedDate = TimeProvider.Today });

            Assert.AreEqual(String.Empty, clientServices.SaveSolidarityGroup(ref group));
        }