public void InitTest()
		{
			base.InitDbContext();

			_backgroundService = Substitute.For<IBackgroundService>();
			_appraiserOrderRepository = new AppraiserOrderRepository(this.DbFactory);
			_orderRepository = new OrderRepository(this.DbFactory);
			_commitProvider = new CommitProvider(this.DbFactory);
			_userRepository = new UserRepository(this.DbFactory);
			_taskManager = new TaskManager(_backgroundService, _userRepository);
			_referenceManagement = new ReferenceManagement(new ReferenceRepository(this.DbFactory), new WebCacheService());
			_dateTimeManager = new DateTimeManager(_referenceManagement);
			_appraiserManagement = Substitute.For<IAppraiserManagement>();
			_configHelper = Substitute.For<IConfigurationHelper>();
			_orderManager = new OrderManager(
				_orderRepository,
				Substitute.For<IClientUserRepository>(),
				_referenceManagement,
				_appraiserManagement,
				_configHelper,
				Substitute.For<IAppraiserOrderRepository>(),
				Substitute.For<IChangeTrackingRepository>(),
				Substitute.For<IOrderHistoryManager>(),
				Substitute.For<IOrderDocumentsRepository>());

			_appraiserOrderDeliveryService = new AppraiserOrderDeliveryService(_taskManager, _appraiserOrderRepository, _commitProvider, _orderManager,
				new DateTimeManager(_referenceManagement), Substitute.For<IOrderHistoryManager>(), Substitute.For<IAppraiserOrderSetPointsRepository>(),
				Substitute.For<IAppraiserOrderListItemRepository>(),
				Substitute.For<IOrderPeriodicalNotificationManager>());
		}
Example #2
0
		public FeeDisbursementManager(IReferenceManagement referenceManager, IOrderRepository orderRepository, ICryptographicProvider cryptographicProvider)
		{
			_cryptographicProvider = ValidationUtil.CheckOnNullAndThrowIfNull(cryptographicProvider);
			_referenceManager = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManager);
			_orderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderRepository);
			_dateTimeManager = new DateTimeManager(_referenceManager);
		}
Example #3
0
		public void TestInitialize()
		{
			_referenceManager = Substitute.For<IReferenceManagement>();
			_orderRepository = Substitute.For<IOrderRepository>();
			_dateTimeManager = new DateTimeManager(_referenceManager);
			_cryptographicProvider = Substitute.For<ICryptographicProvider>();
			_feeDisbursementManager = new FeeDisbursementManager(_referenceManager, _orderRepository, _cryptographicProvider);
		}
Example #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);
		}
		public AppraiserOrderDeliveryService(ITaskManager taskManager, IAppraiserOrderRepository appraiserOrderRepository,
			ICommitProvider commitProvider, IOrderManager orderManager, DateTimeManager dateTimeManager, IOrderHistoryManager orderHistoryManager,
			IAppraiserOrderSetPointsRepository appraiserOrderSetPointsRepository, IAppraiserOrderListItemRepository appraiserOrderListItemRepository,
			IOrderPeriodicalNotificationManager orderPeriodicalNotificationManager)
		{
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
			_appraiserOrderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderRepository);
			_commitProvider = ValidationUtil.CheckOnNullAndThrowIfNull(commitProvider);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_dateTimeManager = ValidationUtil.CheckOnNullAndThrowIfNull(dateTimeManager);
			_orderHistoryManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderHistoryManager);
			_appraiserOrderSetPointsRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderSetPointsRepository);
			_appraiserOrderListItemRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderListItemRepository);
			_orderPeriodicalNotificationManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderPeriodicalNotificationManager);
		}
Example #6
0
		public DateTimeManagerTest()
		{
			_referenceManagement = Substitute.For<IReferenceManagement>();

			DateTime[] holidays = new DateTime[]
			{
				new DateTime(2012, 01, 02),
				new DateTime(2012, 01, 16),
				new DateTime(2012, 02, 20),
				new DateTime(2012, 05, 28),
				new DateTime(2012, 07, 04),
				new DateTime(2012, 09, 03),
				new DateTime(2012, 10, 08),
				new DateTime(2012, 11, 12),
				new DateTime(2012, 11, 22),
				new DateTime(2012, 12, 15),
			};
			_referenceManagement.IsHolidayDay(Arg.Is<DateTime>(e => holidays.Contains(e.Date))).Returns(true);

			_dateTimeManager = new DateTimeManager(_referenceManagement);
		}
Example #7
0
		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);
		}