public void UserCanSpecifyEnvironmentVariables() { var variables = new [] { new EnvironmentVariable(Key, Value) }; var jobWithCustomConfiguration = JobExtensions.With(Job.Dry, variables); var config = CreateSimpleConfig(job: jobWithCustomConfiguration); CanExecute <WithEnvironmentVariables>(config); }
public static IWindsorContainer RegisterQuartzJobs(this IWindsorContainer container, params Type[] jobTypes) { foreach (var type in jobTypes) { if (JobExtensions.IsJob(type)) { container.AddComponentLifeStyle(type.FullName.ToLower(), type, LifestyleType.Transient); } } return(container); }
public void ClassNotSpecifyingTheNameAttribute() { var result = JobExtensions.GetName(typeof(NoNameAttribute)); Assert.Equal("NoNameAttribute", result); }
public void ClassSpecifyingTheNameAttributeWithAName() { var result = JobExtensions.GetName(typeof(NameAttributeWithName)); Assert.Equal("HelloWorld", result); }