예제 #1
0
		public AppraiserProfileController
				(
				IAppraiserUserService appraiserUserService,
				IAscGovLicenseService ascGovLicenseService,
				IUsersManagement usersManager,
				IReferenceManagement referenceManagement,
				IDVSUserManager dvsUsersManager,
				IAppraiserManagement appraiserManager,
				IAppraiserAccessManager appraiserAccessManager,
				IHUDService hudService,
				IUserAccessHelper userAccessHelper,
				IGeocodingValidation geocodingValidation,
				ITestOrderManager testOrderManager,
				ITaskManager taskManager
				)
		{
			_appraiserUserService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserUserService);
			_ascGovLicenseService = ValidationUtil.CheckOnNullAndThrowIfNull(ascGovLicenseService);
			_usersManager = ValidationUtil.CheckOnNullAndThrowIfNull(usersManager);
			_referenceManagement = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManagement);
			_appraiserManager = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserManager);
			_dvsUsersManager = ValidationUtil.CheckOnNullAndThrowIfNull(dvsUsersManager);
			_appraiserAccessManager = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserAccessManager);
			_hudService = ValidationUtil.CheckOnNullAndThrowIfNull(hudService);
			_userAccessHelper = ValidationUtil.CheckOnNullAndThrowIfNull(userAccessHelper);
			_geocodingValidation = geocodingValidation;
			_testOrderManager = ValidationUtil.CheckOnNullAndThrowIfNull(testOrderManager);
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
		}
예제 #2
0
파일: HomeController.cs 프로젝트: evkap/DVS
		public HomeController(IUsersManagement userManagement,
			IAuthProvider authenticationProvider, IUserAccessHelper userAccessHelper, IAppraiserManagement appraiserManagement, ITaskManager taskManager)
		{
			_userManagement = userManagement;
			_authenticationProvider = authenticationProvider;
			_userAccessHelper = userAccessHelper;
			_appraiserManagement = appraiserManagement;
			_taskManager = taskManager;
		}
예제 #3
0
		public void SetUp()
		{
			_actionDescriptor = Substitute.For<ActionDescriptor>();
			_controller = new TargetController();
			_viewContex = new ViewContext();
			var userManager = Substitute.For<IUsersManagement>();
			_accessHelper = Substitute.For<IUserAccessHelper>();

			_viewContex.HttpContext = MockHttpContext.FakeHttpContext();
			_viewContex.HttpContext.Request.RequestContext.RouteData = new System.Web.Routing.RouteData();
			_viewContex.HttpContext.Request.RequestContext.RouteData.Values.Add("controller", "c");
			_viewContex.HttpContext.Request.RequestContext.RouteData.Values.Add("action", "a");
			_controller.SetFakeControllerContext(_viewContex.HttpContext);
			_viewContex.HttpContext.User.Identity.Name.Returns("username");

			_attribute = new DVSAuthorizeFilterAttribute();
			_attribute.AccessHelper = _accessHelper;

		}
		public AppraisalCompanyDetailsController(IAppraisalCompanyService appraisalCompanyWizardService, IAppraisalCompanyBranchesService appraisalCompanyAdminManagement, IReferenceManagement referenceManagement, IUserAccessHelper userAccessHelper, IGeocodingValidation geocodingValidation)
		{
			_appraisalCompanyWizardService = appraisalCompanyWizardService;
			_referenceManagement = referenceManagement;
			_userAccessHelper = userAccessHelper;
			_geocodingValidation = geocodingValidation;

			var branchesDatabaseService = new BranchesDatabaseService(appraisalCompanyAdminManagement);
			_propertyCurrentCompanyService = new PropertyCurrentCompanyService();
			branchesDatabaseService.CurrentCompanyService = _propertyCurrentCompanyService;
			var branchesSecurityService = new BranchesServiceSecurity(branchesDatabaseService,
																																new Lazy<AppraisalCompanyDetailsViewModel>(
																																	() =>
																																	_appraisalCompanyWizardService.GetAppraisalCompanyDetails(
																																		_propertyCurrentCompanyService.CurrentCompany)));
			_branchesService = branchesSecurityService;
			_brancheMessagesService = new BrancheMessageService(() => Session, _propertyCurrentCompanyService)
			{
				BrancheAddedMessage = Constants.Notifications.BranchSaved,
				BranchesAddedMessage = Constants.Notifications.BranchesSaved,
				EmptyResult = string.Empty
			};
		}
예제 #5
0
파일: MenuController.cs 프로젝트: evkap/DVS
		public MenuController(IUserAccessHelper accessHelper)
		{
			_accessHelper = accessHelper;
		}