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 IApplicant Create(string type, IBLLLoanAPound bll) { IApplicant applicant = null; switch (type) { case "test": applicant = new Applicant(bll); break; default: applicant = null; break; } return(applicant); }
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); }
static public ILoanEngine Create(string type, IBLLLoanAPound bll) { ILoanEngine loanEngine = null; switch (type) { case "test": loanEngine = new LoanEngine(bll); break; default: loanEngine = null; break; } return(loanEngine); }
static public IAdministrator Create(string type, IBLLLoanAPound bll) { IAdministrator administrator = null; switch (type) { case "test": administrator = new Administrator(bll); break; default: administrator = null; break; } return(administrator); }
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 Applicant(IBLLLoanAPound bll) { _bll = bll; }
public LoanEngine(IBLLLoanAPound bll) { _bll = bll; }
public Administrator(IBLLLoanAPound bll) { _bll = bll; }