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 BranchesService(IClientCompanyManagement clientCompanyManagement, IClientBranchManager clientBranchManager, IReferenceManagement referenceManagement, IClientUserManager clientUserManager, StatusHistoryManager statusHistoryManager)
		{
			_clientCompanyManagement = ValidationUtil.CheckOnNullAndThrowIfNull(clientCompanyManagement);
			_clientBranchManager = ValidationUtil.CheckOnNullAndThrowIfNull(clientBranchManager);
			_referenceManagement = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManagement);
			_statusHistoryManager = ValidationUtil.CheckOnNullAndThrowIfNull(statusHistoryManager);
			_clientUserManager = ValidationUtil.CheckOnNullAndThrowIfNull(clientUserManager);
		}
示例#3
0
		public BranchesServiceTest()
		{
			_clientBranchManager = Substitute.For<IClientBranchManager>();
			_clientCompanyManagement = Substitute.For<IClientCompanyManagement>();
			_clientUserManager = Substitute.For<IClientUserManager>();
			_referenceManagement = Substitute.For<IReferenceManagement>();
			_statusHistoryManager = Substitute.For<StatusHistoryManager>(Substitute.For<IChangeTrackingRepository>());
			_target = new BranchesService(_clientCompanyManagement, _clientBranchManager, _referenceManagement, _clientUserManager, _statusHistoryManager);
		}
示例#4
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;
		}