public void ValidateByNullJobNameShouldThrowArgumentNullException() { // Arrange var jobNameValidator = new JobNameValidator(); string jobName = null; // Act // Assert Assert.Throws <ArgumentNullException>(nameof(jobName), () => { jobNameValidator.Validate(jobName); }); }
public void ValidateByInvalidJobNameShouldThrowException() { // Arrange var jobNameValidator = new JobNameValidator(); var jobName = INVALID_JOB_NAME; // Act // Assert Assert.Throws(typeof(Exception), () => { jobNameValidator.Validate(jobName); }); }
public void ValidateByValidJobNameShouldReturnTrue() { // Arrange var jobNameValidator = new JobNameValidator(); var jobName = VALID_JOB_NAME; // Act var result = jobNameValidator.Validate(jobName); // Assert Assert.True(result); }