예제 #1
0
        public void ValidateByNullJobNameShouldThrowArgumentNullException()
        {
            // Arrange
            var    jobNameValidator = new JobNameValidator();
            string jobName          = null;

            // Act
            // Assert
            Assert.Throws <ArgumentNullException>(nameof(jobName), () => { jobNameValidator.Validate(jobName); });
        }
예제 #2
0
        public void ValidateByInvalidJobNameShouldThrowException()
        {
            // Arrange
            var jobNameValidator = new JobNameValidator();
            var jobName          = INVALID_JOB_NAME;

            // Act
            // Assert
            Assert.Throws(typeof(Exception), () => { jobNameValidator.Validate(jobName); });
        }
예제 #3
0
        public void ValidateByValidJobNameShouldReturnTrue()
        {
            // Arrange
            var jobNameValidator = new JobNameValidator();
            var jobName          = VALID_JOB_NAME;

            // Act
            var result = jobNameValidator.Validate(jobName);

            // Assert
            Assert.True(result);
        }