public void SetUp()
		{
			AppraiserManagement = Substitute.For<IAppraiserManagement>();
			AppraisalCompanyManagement = Substitute.For<IAppraisalCompanyManagement>();
			FeeManager = Substitute.For<IFeeManager>();
			ReferenceManager = Substitute.For<IReferenceManagement>();
			GeocodingDataService = Substitute.For<IGeocodingDataService>();

			var states = new Dictionary<string, string>();
			states.Add("AL", "AL, Alabama");
			states.Add("AK", "AK, Alaska");
			ReferenceManager.GetAllStates().Returns(states);

			var accountTypes = new Dictionary<int, string>();
			accountTypes.Add((int)AccountType.Checking, "Check");
			accountTypes.Add((int)AccountType.MoneyMarket, "Money");
			accountTypes.Add((int)AccountType.Savings, "Save");
			ReferenceManager.GetReference(ReferenceType.AccountTypes).Returns(accountTypes);
			ReferenceManager.HasReferenceKey(ReferenceType.AccountTypes, (int)AccountType.Checking).Returns(true);


			StatusHistoryManager = new StatusHistoryManager(Substitute.For<IChangeTrackingRepository>());
			CryptographicProvider = Substitute.For<ICryptographicProvider>();
			//throw new ApplicationException("Please compile before check in");
			Target = new AppraisalCompanyService(AppraisalCompanyManagement, AppraiserManagement, FeeManager, StatusHistoryManager, ReferenceManager, CryptographicProvider, GeocodingDataService);
		}
예제 #2
0
		public AppraisalCompanyService(IAppraisalCompanyManagement appraisalCompanyManagement,
			IAppraiserManagement appraisalCompanyAdminManagement,
			IFeeManager feeManager,
			StatusHistoryManager statusHistoryManager,
			IReferenceManagement referenceManagement,
			ICryptographicProvider cryptographicProvider,
			IGeocodingDataService geocodingService)
		{
			_appraisalCompanyManagement = appraisalCompanyManagement;
			_appraisalCompanyAdminManagement = appraisalCompanyAdminManagement;
			_feeManager = feeManager;
			_referenceManagement = referenceManagement;
			_cryptographicProvider = cryptographicProvider;
			_addressManager = new AddressManager(referenceManagement);
			_phoneManager = new PhoneManager();
			_statusHistoryManager = statusHistoryManager;
			_geocodingDataService = geocodingService;
		}
예제 #3
0
파일: OrderService.cs 프로젝트: evkap/DVS
		public OrderService(IOrderRepository orderRepository,
			IReferenceManagement referenceManagement,
			IGeocodingDataService geocodingDataService, ITaskManager taskManager, IOrderManager orderManager,
			IAppraisalFormsService appFormsService, IClientDashboardService dashboarService, IConfigurationHelper configurationHelper,
			ICryptographicProvider cryptographicProvider, IDocumentService documentService, IReportManager reportManager, ISecurityContext securityContext,
			IOrderDocumentsRepository orderDocumentsRepository)
		{
			_orderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderRepository);
			_referenceManager = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManagement);
			_geocodingDataService = ValidationUtil.CheckOnNullAndThrowIfNull(geocodingDataService);
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_appFormsService = ValidationUtil.CheckOnNullAndThrowIfNull(appFormsService);
			_dashboarService = ValidationUtil.CheckOnNullAndThrowIfNull(dashboarService);
			_configurationHelper = ValidationUtil.CheckOnNullAndThrowIfNull(configurationHelper);
			_cryptographicProvider = ValidationUtil.CheckOnNullAndThrowIfNull(cryptographicProvider);
			_documentService = ValidationUtil.CheckOnNullAndThrowIfNull(documentService);
			_reportManager = ValidationUtil.CheckOnNullAndThrowIfNull(reportManager);
			_securityContext = ValidationUtil.CheckOnNullAndThrowIfNull(securityContext);
			_orderDocumentsRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderDocumentsRepository);

			_addressManager = new AddressManager(_referenceManager);
			_dateTimeManager = new DateTimeManager(_referenceManager);
		}
예제 #4
0
		public GeocondingController(IGeocodingDataService geocodingDataService, IAppraiserUserService appraiserUserService)
		{
			_geocodingDataService = ValidationUtil.CheckOnNullAndThrowIfNull(geocodingDataService);
			_appraiserUserService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserUserService);
		}
예제 #5
0
		public GeocodingZIPValidation(IGeocodingDataService geocodingDataService)
		{
			if (geocodingDataService == null) throw new ArgumentNullException("geocodingDataService");

			_geocodingDataService = geocodingDataService;
		}