Пример #1
0
		public ACIController(IOrderDocumentsService orderDocumentsService, IOrderFulfillmentService orderFulfillmentService, IOrderManager orderManager, IDocumentService documentService)
		{
			_orderDocumentsService = orderDocumentsService;
			_orderFulfillmentService = orderFulfillmentService;
			_documentService = documentService;
			_hotSpotDataFolder = new ConfigHelper().HotSpotDataFolder;
			_orderManager = orderManager;
		}
Пример #2
0
		public void Setup()
		{
			base.InitDbContext();
			_smsRepository = Substitute.For<ISMSTemplateRepository>();
			_appraiserDelivery = Substitute.For<IAppraiserOrderDeliveryService>();
			_taskManager = Substitute.For<ITaskManager>();
			_configHelper = new ConfigHelper();
			_smsmanager = new SmsManager(_configHelper, _smsRepository, _appraiserDelivery, _taskManager);
		
			
		}
Пример #3
0
        public void MailManagerTest_InitTest()
		{
			base.InitDbContext();
			_usersManagement = Substitute.For<IUsersManagement>();
			_appraiserManagement = Substitute.For<IAppraiserManagement>();
			_referenceManagement = Substitute.For<IReferenceManagement>();
			_dvsUserManager = Substitute.For<IDVSUserManager>();
			_emailRepsoitory = new EmailTemplateRepository(this.DbFactory);
			_configHelper = new ConfigHelper();

			_target = new MailManager(_usersManagement, _appraiserManagement, _referenceManagement, _emailRepsoitory, _dvsUserManager, _configHelper);
		}
Пример #4
0
		public void SendUserCreatedMail(string userEmail, bool isCompany = false)
		{
			var configuration = new ConfigHelper();
			var parameters = new Dictionary<string, string>();
			parameters.Add(Constants.EmailTemplateKeyWords.EmailFrom, configuration.EmailFrom);
			parameters.Add(Constants.EmailTemplateKeyWords.CompanyInformationLink, configuration.DirectValuationCompanyInfo);
			parameters.Add(Constants.EmailTemplateKeyWords.FAQLink, configuration.DirectValuationFaq);
			var appraiser = _appraiserManagement.GetByEmail(userEmail);
			parameters.Add(Constants.EmailTemplateKeyWords.UserName,
										 !isCompany
											? appraiser.User.FirstName
											: appraiser.Company.CompanyAdmins.Single().User.FirstName);
			SendMailInternal(isCompany ? EmailTemplateType.AppraisalCompanySignUp : EmailTemplateType.AppraiserSignUp, userEmail, parameters);
		}
Пример #5
0
    public void Init(HttpApplication context)
    {
      context.BeginRequest += (sender, e) =>
      {
        var request = ((HttpApplication)sender).Request;
        //TODO: By default only local requests are profiled, optionally you can set it up
        //  so authenticated users are always profiled
        ConfigHelper cfg = new ConfigHelper();
        if (cfg.IsMiniProfilerEnabled)
        {
          var ignored = MiniProfiler.Settings.IgnoredPaths.ToList();

          ignored.Add("WebResource.axd");
          ignored.Add("/Mini-profiler-resources/");

          MiniProfiler.Settings.IgnoredPaths = ignored.ToArray();

          MiniProfiler.Start();
        }
      };


      // TODO: You can control who sees the profiling information
      /*
      context.AuthenticateRequest += (sender, e) =>
      {
          if (!CurrentUserIsAllowedToSeeProfiler())
          {
              StackExchange.Profiling.MiniProfiler.Stop(discardResults: true);
          }
      };
      */

      context.EndRequest += (sender, e) =>
      {
        MiniProfiler.Stop();
      };
    }