public void ValidateNonPositiveWorkItemConcurrency()
        {
            Assert.Throws <ArgumentOutOfRangeException>(
                () => RedisOrchestrationServiceSettings.Validate(
                    new RedisOrchestrationServiceSettings
            {
                MaxConcurrentTaskActivityWorkItems = 0,
            }));

            Assert.Throws <ArgumentOutOfRangeException>(
                () => RedisOrchestrationServiceSettings.Validate(
                    new RedisOrchestrationServiceSettings
            {
                MaxConcurrentTaskOrchestrationWorkItems = 0,
            }));

            Assert.Throws <ArgumentOutOfRangeException>(
                () => RedisOrchestrationServiceSettings.Validate(
                    new RedisOrchestrationServiceSettings
            {
                MaxConcurrentTaskActivityWorkItems = -1,
            }));

            Assert.Throws <ArgumentOutOfRangeException>(
                () => RedisOrchestrationServiceSettings.Validate(
                    new RedisOrchestrationServiceSettings
            {
                MaxConcurrentTaskOrchestrationWorkItems = -1,
            }));
        }
        public static RedisOrchestrationService GetTestOrchestrationService(string taskHub = null)
        {
            RedisTestConfig testConfig = GetRedisTestConfig();
            var             settings   = new RedisOrchestrationServiceSettings
            {
                RedisConnectionString = testConfig.RedisConnectionString,
                TaskHubName           = taskHub ?? "TaskHub"
            };

            return(new RedisOrchestrationService(settings));
        }
        public void ValidateNullConnectionString()
        {
            Assert.Throws <ArgumentNullException>(
                () => RedisOrchestrationServiceSettings.Validate(
                    new RedisOrchestrationServiceSettings
            {
                RedisConnectionString = null,
            }));

            Assert.Throws <ArgumentNullException>(
                () => RedisOrchestrationServiceSettings.Validate(
                    new RedisOrchestrationServiceSettings
            {
                RedisConnectionString = string.Empty,
            }));
        }
 public void ValidateNullSettings()
 {
     Assert.Throws <ArgumentNullException>(
         () => RedisOrchestrationServiceSettings.Validate(null));
 }
 public void ValidateDefaultSettings()
 {
     RedisOrchestrationServiceSettings.Validate(
         new RedisOrchestrationServiceSettings());
 }