public void Setup() { dal = DALLoanAPoundCreator.Create("test"); bll = BLLLoanAPoundCreator.Create("test", dal); loanEngine = LoanEngineCreator.Create("test", bll); applicant = ApplicantCreator.Create("test", bll); }
public void Setup() { //Inject classes for tests dal = DALLoanAPoundCreator.Create("test"); bll = BLLLoanAPoundCreator.Create("test", dal); applicant = ApplicantCreator.Create("test", bll); }
static public ICreditCheckerRule Create(Loan loan, IDALLoanAPound dal) { ICreditCheckerRule creditCheckerRule = null; if (loan.LoanAmount > 50000) { creditCheckerRule = new TestCreditCheckerRule1(dal); } else { creditCheckerRule = new TestCreditCheckerRule2(dal); } return(creditCheckerRule); }
static public IDALLoanAPound Create(string dalinstance) { IDALLoanAPound dal = null; switch (dalinstance) { case "test": dal = new LoanAPound.DAL.TestRepository(); break; default: dal = null; break; } return(dal); }
static public IBLLLoanAPound Create(string bllInstance, IDALLoanAPound dal) { IBLLLoanAPound bllLoan = null; switch (bllInstance) { case "test": bllLoan = new BLLLoanAPound(dal); break; default: bllLoan = null; break; } return(bllLoan); }
public void AdminCanCreateALoanType() { //Inject DAL and BLL classes for testing IDALLoanAPound dal = null; dal = DALLoanAPoundCreator.Create("test"); IBLLLoanAPound bll = null; bll = BLLLoanAPoundCreator.Create("test", dal); IAdministrator administrator = null; administrator = AdministratorCreator.Create("test", bll); //Act administrator.SetUpLoanType(1, "Type1", 1, 25, 4.5); //Assert Assert.AreEqual(dal.loantypes.Count, 1); }
public TestCreditCheckerRule2(IDALLoanAPound dal) { _dal = dal; }
public BLLLoanAPound(IDALLoanAPound dal) { _dal = dal; }