Example #1
0
        private static void Main(string[] args)
        {
            ProcessArgs(args);
            var         lenderRepo  = new CsvLenderRepository(_lendersFilePath);
            var         loanService = new LoanFinderService(lenderRepo);
            LoanRequest request;

            try {
                request = loanService.FindBestRate(_loanAmount);
                request.PrintLoanDetails();
            } catch (Exception ex) {
                PrintErrorAndExit(String.Format("Error processing loan request: {0}", ex.Message));
            }
        }
 public LoanFinderServiceTests()
 {
     _loanService = new LoanFinderService(new MockLenderRepository());
 }