public void Set_QueuePollInterval_ShouldThrowAnException_WhenGivenIntervalIsNegative() { var options = new FluentNHibernateStorageOptions(); Assert.Throws <ArgumentException>( () => options.QueuePollInterval = TimeSpan.FromSeconds(-1)); }
public void Set_QueuePollInterval_SetsTheValue() { var options = new FluentNHibernateStorageOptions(); options.QueuePollInterval = TimeSpan.FromSeconds(1); Assert.Equal(TimeSpan.FromSeconds(1), options.QueuePollInterval); }
public void Set_QueuePollInterval_ShouldThrowAnException_WhenGivenIntervalIsEqualToZero() { var options = new FluentNHibernateStorageOptions(); Assert.Throws <ArgumentException>( () => options.QueuePollInterval = TimeSpan.Zero); }
public void Ctor_SetsTheDefaultOptions() { var options = new FluentNHibernateStorageOptions(); Assert.True(options.QueuePollInterval > TimeSpan.Zero); Assert.True(options.InvisibilityTimeout > TimeSpan.Zero); Assert.True(options.JobExpirationCheckInterval > TimeSpan.Zero); Assert.True(options.PrepareSchemaIfNecessary); }
public void Ctor_SetsTheDefaultOptions() { var options = new FluentNHibernateStorageOptions(); Assert.True(options.QueuePollInterval > TimeSpan.Zero); Assert.True(options.JobExpirationCheckInterval > TimeSpan.Zero); Assert.True(options.UpdateSchema); }
public FluentNHibernateFetchedJobTests() { _fetchedJob = new FetchedJob { Id = _id, JobId = JobId, Queue = Queue }; var options = new FluentNHibernateStorageOptions { UpdateSchema = false }; _storage = new Mock <FluentNHibernateJobStorage>(ConnectionUtils.GetPersistenceConfigurer(), options); }
public FluentNHibernateJobQueueProvider(FluentNHibernateJobStorage storage, FluentNHibernateStorageOptions options) { if (storage == null) { throw new ArgumentNullException("storage"); } if (options == null) { throw new ArgumentNullException("options"); } _jobQueue = new FluentNHibernateJobQueue(storage, options); _monitoringApi = new FluentNHibernateJobQueueMonitoringApi(storage); }
public FluentNHibernateJobQueue(FluentNHibernateJobStorage storage, FluentNHibernateStorageOptions options) { Logger.Info("Job queue initialized"); _storage = storage ?? throw new ArgumentNullException("storage"); _options = options ?? throw new ArgumentNullException("options"); }
public FluentNHibernateStorageTests() { _options = new FluentNHibernateStorageOptions { UpdateSchema = false }; }
public FluentNHibernateStorageTests() { _options = new FluentNHibernateStorageOptions { PrepareSchemaIfNecessary = false }; }
public static FluentNHibernateJobStorage GetStorage(FluentNHibernateStorageOptions options = null) { return(new FluentNHibernateJobStorage(GetPersistenceConfigurer(), options)); }