예제 #1
0
        public void SimulatedPlayerDeploymentConfig_does_not_throw_error_for_valid_worker_type(string workerType)
        {
            var config = DeploymentConfigTestUtils.GetValidSimPlayerConfig();

            config.WorkerType = workerType;

            Assert.IsEmpty(config.GetErrors());
        }
예제 #2
0
        public void SimulatedPlayerDeploymentConfig_does_not_throw_error_for_valid_flag_prefix(string flagPrefix)
        {
            var config = DeploymentConfigTestUtils.GetValidSimPlayerConfig();

            config.FlagPrefix = flagPrefix;

            Assert.IsEmpty(config.GetErrors());
        }
예제 #3
0
        public void SimulatedPlayerDeploymentConfig_throws_error_for_invalid_worker_type(string workerType)
        {
            var config = DeploymentConfigTestUtils.GetValidSimPlayerConfig();

            config.WorkerType = workerType;
            var errors = config.GetErrors().ToArray();

            Assert.AreEqual(errors.Length, 1, "Failed: did not throw exactly one error.");
            Assert.IsTrue(errors[0].Contains("Worker Type"));
            Assert.IsTrue(errors[0].Contains(DeploymentConfigErrorTypes.NullOrEmpty));
        }
예제 #4
0
        public void SimulatedPlayerDeploymentConfig_throws_error_for_invalid_flag_prefix(string flagPrefix, string errorType)
        {
            var config = DeploymentConfigTestUtils.GetValidSimPlayerConfig();

            config.FlagPrefix = flagPrefix;
            var errors = config.GetErrors().ToArray();

            Assert.AreEqual(errors.Length, 1, "Failed: did not throw exactly one error.");
            Assert.IsTrue(errors[0].Contains("Flag Prefix"));
            Assert.IsTrue(errors[0].Contains(errorType));
        }
예제 #5
0
 public void SimulatedPlayerDeploymentConfig_does_not_throw_error_when_valid()
 {
     Assert.IsEmpty(DeploymentConfigTestUtils.GetValidSimPlayerConfig().GetErrors());
 }