Exemple #1
0
		public AppraiserManagement(IUserRepository userRepository, IAppraiserUserRepository appraiserUserRepository, IReferenceManagement refManager, ITaskManager taskManager, IAscGovLicenseService ascLicenseService)
		{
			_userRepository = userRepository;
			_appraiserUserRepository = appraiserUserRepository;
			_refManager = refManager;
			_taskManager = taskManager;
			_ascLicenseService = ascLicenseService;
		}
Exemple #2
0
		public void InitTest()
		{
			_orderRepository = Substitute.For<IOrderRepository>();
			_orderHistoryManager = Substitute.For<IOrderHistoryManager>();
			_orderDocumentsRepository = Substitute.For<IOrderDocumentsRepository>();
			_appraiserOrderRepository = Substitute.For<IAppraiserOrderRepository>();
			_securityContext = Substitute.For<ISecurityContext>();
			_referenceManagement = Substitute.For<IReferenceManagement>();
			_documentService = Substitute.For<IDocumentService>();
			_businessDaysCalc = Substitute.For<IBusinessDaysCalc>();
			_appraiserUserRepository = Substitute.For<IAppraiserUserRepository>();
			_configurationHelper = Substitute.For<IConfigurationHelper>();

			_referenceManagement.GetTestOrderData().Returns(new Dictionary<OrderField, string>() 
			{
				{OrderField.AppraisalForm, "1"},
				{OrderField.AppraisalTypeId, "1"},
				{OrderField.BorrowerFirstName, "Borrower"},
				{OrderField.BorrowerLastName, "Test"},
				{OrderField.ClientCompanyBrancheId, "1"},
				{OrderField.ClientCompanyId, "1"},
				{OrderField.ContactName, ""},
				{OrderField.ContactPhone, "111-111-1111"},
				{OrderField.ContactRoleId, "1"},
				{OrderField.CreatedByClientUserId, "1"},
				{OrderField.GFEAmount, "130"},
				{OrderField.LoanNumber, "test"},
				{OrderField.LoanPurposeTypeId, "5"},
				{OrderField.LoanTypeId, "1"},
				{OrderField.OccupancyTypeId, "1"},
				{OrderField.OrderPublicId, "TEST_ORDER"},
				{OrderField.PropertyCity, "Anytown"},
				{OrderField.PropertyCounty, "Anycounty"},
				{OrderField.PropertyState, "CA"},
				{OrderField.PropertyStreet, "111 Main St"},
				{OrderField.PropertyTypeId, "1"},
				{OrderField.PropertyZip, "95630"},
				{OrderField.PurchaseContractFileName, "AGREEMENT TO PURCHASE REAL ESTATE.pdf"},
				{OrderField.PurchasePrice, "500000"}	
			});

			_target = new TestOrderManager(
				_orderRepository,
				_orderHistoryManager,
				_appraiserOrderRepository,
				_securityContext,
				_orderDocumentsRepository,
				_referenceManagement,
				_documentService,
				_businessDaysCalc,
				_appraiserUserRepository,
				_configurationHelper
				);
		}
		public SendAppraiserOrderInvitationEmail(IMailManager mailManager, IAppraiserUserRepository appraiserUserRepository,
			IAppraiserOrderRepository appraiserOrderRepository, IReferenceManagement referenceManager,
			IConfigurationHelper configurationHelper, IAppraisalFormsService formsService)
		{
			_mailManager = mailManager;
			_appraiserUserRepository = appraiserUserRepository;
			_appraiserOrderRepository = appraiserOrderRepository;
			_referenceManager = referenceManager;
			_configurationHelper = configurationHelper;
			_formsService = formsService;
		}
Exemple #4
0
		public OrderAssignmentService(IAppraiserUserRepository appraiserUserRepository, IOrderManager orderManager, ITaskManager taskManager,
			DateTimeManager dateTimeManager, IAppraiserOrderDeliveryService appraiserOrderDeliveryService, IConfigurationHelper configurationHelper,
			IAppraiserOrderRepository appraiserOrderRepository)
		{
			_appraiserUserRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserUserRepository);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
			_dateTimeManager = ValidationUtil.CheckOnNullAndThrowIfNull(dateTimeManager);
			_appraiserOrderDeliveryService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderDeliveryService);
			_configurationHelper = ValidationUtil.CheckOnNullAndThrowIfNull(configurationHelper);
			_appraiserOrderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderRepository);
		}
Exemple #5
0
		public void InitTest()
		{
			base.InitDbContext();

			_appraiserUserRepository = new AppraiserUserRepository(this.DbFactory);
			_orderRepository = new OrderRepository(this.DbFactory);
			_appraiserOrderDeliveryService = Substitute.For<IAppraiserOrderDeliveryService>();
			_orderManager = new OrderManager(_orderRepository, Substitute.For<IClientUserRepository>(), Substitute.For<IReferenceManagement>(),
				Substitute.For<IAppraiserManagement>(), Substitute.For<IConfigurationHelper>(),
				Substitute.For<IAppraiserOrderRepository>(), Substitute.For<IChangeTrackingRepository>(), Substitute.For<IOrderHistoryManager>(),
				Substitute.For<IOrderDocumentsRepository>());
			_taskManager = Substitute.For<ITaskManager>();

			_orderAssignmentService = new OrderAssignmentService(_appraiserUserRepository, _orderManager, _taskManager,
				new DateTimeManager(Substitute.For<IReferenceManagement>()), _appraiserOrderDeliveryService,
				Substitute.For<IConfigurationHelper>(), Substitute.For<IAppraiserOrderRepository>());
		}
Exemple #6
0
		public TestOrderManager(
			IOrderRepository orderRepository,
			IOrderHistoryManager orderHistoryManager,
			IAppraiserOrderRepository appraiserOrderRepository,
			ISecurityContext securityContext,
			IOrderDocumentsRepository orderDocumentsRepository,
			IReferenceManagement referenceManagement,
			IDocumentService documentService,
			IBusinessDaysCalc businessDaysCalc,
			IAppraiserUserRepository appraiserUserRepository,
			IConfigurationHelper configurationHelper)
		{
			_orderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderRepository);
			_orderHistoryManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderHistoryManager);
			_appraiserOrderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderRepository);
			_securityContext = ValidationUtil.CheckOnNullAndThrowIfNull(securityContext);
			_orderDocumentsRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderDocumentsRepository);
			_referenceManagement = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManagement);
			_documentService = ValidationUtil.CheckOnNullAndThrowIfNull(documentService);
			_businessDaysCalc = ValidationUtil.CheckOnNullAndThrowIfNull(businessDaysCalc);
			_appraiserUserRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserUserRepository);
			_configurationHelper = ValidationUtil.CheckOnNullAndThrowIfNull(configurationHelper);
		}