예제 #1
0
        public void Initialize()
        {
            _mockRepository = new Mock <IMortgageRepository>();
            _service        = new MortgageService(_mockRepository.Object);

            _listMortgages = new List <Mortgage>()
            {
                new Mortgage()
                {
                    MortgageId = 1, Name = "Test", MortgageType = MortgageType.Fixed, InterestRepayment = InterestRepayment.InterestOnly, EffectiveStartDate = DateTime.Now.AddDays(-365), EffectiveEndDate = DateTime.Now, TermsInMonths = 12, CancellationFee = 0, EstablishmentFee = 1000, InterestRate = 13.5M
                },
                new Mortgage()
                {
                    MortgageId = 2, Name = "TestOne", MortgageType = MortgageType.Variable, InterestRepayment = InterestRepayment.InterestOnly, EffectiveStartDate = DateTime.Now.AddDays(-365), EffectiveEndDate = DateTime.Now, TermsInMonths = 12, CancellationFee = 0, EstablishmentFee = 1000, InterestRate = 13.5M
                },
            };


            _mortgage = new Mortgage()
            {
                MortgageId         = 1,
                Name               = "Test",
                MortgageType       = MortgageType.Fixed,
                InterestRepayment  = InterestRepayment.InterestOnly,
                EffectiveStartDate = DateTime.Now.AddDays(-365),
                EffectiveEndDate   = DateTime.Now,
                TermsInMonths      = 12,
                CancellationFee    = 0,
                EstablishmentFee   = 1000,
                InterestRate       = 13.5M
            };
        }
예제 #2
0
 public ServicesController(ILogger <AdminController> logger,
                           IServicesService serviceService,
                           IMortgageService mortgageService)
 {
     _logger          = logger;
     _serviceService  = serviceService;
     _mortgageService = mortgageService;
 }
예제 #3
0
 public MortgageController(ILogger <MortgageController> logger,
                           IMortgageService mortgageService,
                           IMapper mapper)
 {
     _logger          = logger;
     _mortgageService = mortgageService;
     _mapper          = mapper;
 }
예제 #4
0
 public AdminController(ILogger <AdminController> logger,
                        IAdminService adminService,
                        UserManager <ApplicationUser> userManager,
                        IMortgageService mortgageService)
 {
     _logger          = logger;
     _adminService    = adminService;
     _userManager     = userManager;
     _mortgageService = mortgageService;
 }
예제 #5
0
 public MortgageApiController(ICustomerService customerSevice, IMortgageService mortgageService, ISearchService searchService)
 {
     _mortgageService = mortgageService;
     _customerSevice  = customerSevice;
     _searchService   = searchService;
 }
예제 #6
0
 public MortgageController(IMortgageService repository)
 {
     _repository = repository;
 }
예제 #7
0
 public MortgageController(IMortgageService mortgageService)
 {
     _mortgageService = mortgageService;
 }
 public MortgageController(IMortgageService mortgageService, IMapper mapper)
 {
     _mortgageService = mortgageService;
     _mapper          = mapper;
 }
예제 #9
0
 public MortgagesController(IMortgageService service)
 {
     _service = service;
 }
 public MortgageController(IMortgageService service)
 {
     mortgageService = service;
 }
예제 #11
0
        public void Setup()
        {
            mortgageRepo = new Mock <IMortgageRepo>();
            mortgageRepo.Setup(x => x.GetAllMortgages()).Returns(() => new System.Collections.Generic.List <Contracts.Dto.Mortgage>
            {
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 1,
                    Name               = "Fixed Home Loan (Interest Only)",
                    MortgageType       = Contracts.Dto.MortgageType.Fixed,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.InterestOnly,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 4.99M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 2,
                    Name               = "Fixed Home Loan (Principal and Interest)",
                    MortgageType       = Contracts.Dto.MortgageType.Fixed,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.PrincipalAndInterest,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 4.81M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 3,
                    Name               = "Variable Home Loan (Interest Only)",
                    MortgageType       = Contracts.Dto.MortgageType.Variable,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.InterestOnly,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 5.24M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 4,
                    Name               = "Variable Home Loan (Principal and Interest)",
                    MortgageType       = Contracts.Dto.MortgageType.Variable,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.PrincipalAndInterest,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 5.12M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 5,
                    Name               = "Variable Investment Loan (Principal and Interest)",
                    MortgageType       = Contracts.Dto.MortgageType.Variable,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.PrincipalAndInterest,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 5.99M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 6,
                    Name               = "Variable Investment Loan (Interest Only)",
                    MortgageType       = Contracts.Dto.MortgageType.Variable,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.InterestOnly,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 5.39M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 7,
                    Name               = "Fixed Investment Loan (Principal and Interest)",
                    MortgageType       = Contracts.Dto.MortgageType.Fixed,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.PrincipalAndInterest,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 5.89M
                },
                new Contracts.Dto.Mortgage
                {
                    MortgageId         = 8,
                    Name               = "Fixed Investment Loan (Interest Only)",
                    MortgageType       = Contracts.Dto.MortgageType.Fixed,
                    InterestRepayment  = Contracts.Dto.InterestRepayment.InterestOnly,
                    EffectiveStartDate = DateTime.Now,
                    EffectiveEndDate   = DateTime.Now.AddMonths(12),
                    TermsInMonths      = 12,
                    CancellationFee    = 259.99M,
                    EstablishmentFee   = 199.99M,
                    InterestRate       = 5.19M
                }
            });

            mortgageService = new MortgageService(mortgageRepo.Object);
        }
 public MortgagesController()
 {
     this._mortgageService = new MortgageServiceClient();
 }
예제 #13
0
 public MortgageController()
 {
     _mortgageService = new MortgageService();
 }
예제 #14
0
 public TurnService(IMoveService moveService, IMortgageService mortgageService, IBailAdvisor bailAdvisor)
 {
     this.moveService = moveService;
     this.mortgageService = mortgageService;
     this.bailAdvisor = bailAdvisor;
 }
 public MortgageController(DataContext context, ICustomerService customerSevice, IMortgageService mortgageService)
 {
     _context         = context;
     _mortgageService = mortgageService;
     _customerSevice  = customerSevice;
 }