Exemplo n.º 1
0
        public void Set_QueuePollInterval_SetsTheValue()
        {
            var options = new OracleStorageOptions();

            options.QueuePollInterval = TimeSpan.FromSeconds(1);
            Assert.Equal(TimeSpan.FromSeconds(1), options.QueuePollInterval);
        }
Exemplo n.º 2
0
        public void Set_QueuePollInterval_ShouldThrowAnException_WhenGivenIntervalIsNegative()
        {
            var options = new OracleStorageOptions();

            Assert.Throws <ArgumentException>(
                () => options.QueuePollInterval = TimeSpan.FromSeconds(-1));
        }
Exemplo n.º 3
0
        public void Set_QueuePollInterval_ShouldThrowAnException_WhenGivenIntervalIsEqualToZero()
        {
            var options = new OracleStorageOptions();

            Assert.Throws <ArgumentException>(
                () => options.QueuePollInterval = TimeSpan.Zero);
        }
Exemplo n.º 4
0
        public void Ctor_SetsTheDefaultOptions()
        {
            var options = new OracleStorageOptions();

            Assert.True(options.QueuePollInterval > TimeSpan.Zero);
            Assert.True(options.InvisibilityTimeout > TimeSpan.Zero);
            Assert.True(options.JobExpirationCheckInterval > TimeSpan.Zero);
            Assert.True(options.PrepareSchemaIfNecessary);
        }
Exemplo n.º 5
0
        public OracleFetchedJobTests()
        {
            _fetchedJob = new FetchedJob()
            {
                Id = _id, JobId = JobId, Queue = Queue
            };
            _connection = new Mock <IDbConnection>();
            var options = new OracleStorageOptions {
                PrepareSchemaIfNecessary = false
            };

            _storage = new Mock <OracleStorage>(ConnectionUtils.GetConnectionString(), options);
        }
        public OracleJobQueueProvider(OracleStorage storage, OracleStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new OracleJobQueue(storage, options);
            _monitoringApi = new OracleJobQueueMonitoringApi(storage);
        }
        public OracleJobQueue(OracleStorage storage, OracleStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _storage = storage;
            _options = options;
        }
 public OracleJobQueue(OracleStorage storage, OracleStorageOptions options)
 {
     _storage = storage ?? throw new ArgumentNullException(nameof(storage));
     _options = options ?? throw new ArgumentNullException(nameof(options));
 }
 public OracleStorageTests()
 {
     _options = new OracleStorageOptions {
         PrepareSchemaIfNecessary = false
     };
 }