Esempio n. 1
0
		public void TestInitialize()
		{
			_httpClient = new HttpClient();
		}
Esempio n. 2
0
		private static void RunEuroCourseJob(string connectionString)
		{
			var serializer = new Serializer();
			var executor = new SqlProcedureExecutor(connectionString);
			var settings = new SettingRepository(executor, serializer);
			var httpClient = new HttpClient();
			var emailMessageRepository = new EmailMessageRepository(executor);
			var mailSender = new DbMailSender(PartitionIdForOtherMails, emailMessageRepository, serializer);
			var courseSource = new CourseSourceFailPolicy(
				new CourseSourceRetryPolicy(
					new CourseSource(httpClient),
					CourseSourceAttempts,
					JobsLogger,
					CourseSourceRetryPolicyPeriod),
				mailSender,
				EmailsHelper.DefaultFrom,
				EmailsHelper.SupportEmail);

			new EuroCourseJob(settings, courseSource, serializer, PreviousRunEuroCourseJobRubTime).Work();
		}