Пример #1
0
        public void Process(LoanApplication application)
        {
            ILoanApplicationVerifier loanApplicationVerifier = new LoanApplicationVerifier();

            bool isEligible = loanApplicationVerifier.IsEligible(application);

            application.IsApproved = isEligible;

            NotificationService notificationService = new NotificationService();
            notificationService.Notify(application);
        }
        public bool IsEligible(LoanApplication application)
        {
            bool personalDetailsAreValid = new PersonalDetailVerifier().VerifyDetails(application);

            bool professionalDetailsAreValid = new ProfessionalDetailVerifier().VerifyDetails(application);

            bool creditHistoryVerified = new CreditHistoryVerifier().Verify(application);

            bool isPreferredDeveloper = new DeveloperVerifier().IsPreferredDeveloper(application.DeveloperName);

            bool isProjectApproved = isPreferredDeveloper ? true : new ProjectVerifier().IsBlackListedProject(application.ProjectName);

            return personalDetailsAreValid
                && professionalDetailsAreValid
                && creditHistoryVerified
                && isProjectApproved;
        }
Пример #3
0
        public void Process(LoanApplication application)
        {
            bool personalDetailsAreValid = new PersonalDetailVerifier().VerifyDetails(application);

            bool professionalDetailsAreValid = new ProfessionalDetailVerifier().VerifyDetails(application);

            bool creditHistoryVerified = new CreditHistoryVerifier().Verify(application);

            bool isPreferredDeveloper = new DeveloperVerifier().IsPreferredDeveloper(application.DeveloperName);

            bool isProjectApproved = isPreferredDeveloper ? true : new ProjectVerifier().IsBlackListedProject(application.ProjectName);

            bool isEligible = personalDetailsAreValid
                && professionalDetailsAreValid
                && creditHistoryVerified
                && isProjectApproved;

            application.IsApproved = isEligible;

            NotificationService notificationService = new NotificationService();
            notificationService.Notify(application);
        }
 public bool VerifyDetails(LoanApplication application)
 {
     throw new NotImplementedException();
 }
 public NotificationService Notify(LoanApplication application)
 {
     throw new NotImplementedException();
 }