public void IdIsZeroErrorExpected() { var employee = new EmployeeDto() { Id = 0, Surname = "Duck", Name = "Donald", BirthDay = "1984-11-13", StartDate = "2018-01-25", ContractType = "PRTM" }; var addEmployeeValidator = new AddEmployeeValidator(); var result = addEmployeeValidator.Validate(employee); Assert.AreEqual(result.Errors.Count, 1); }
public void StartDateAndBirthDateIsNotValidMoreThen1ErrorExpected() { var employee = new EmployeeDto() { Id = 1, Surname = "Duck", Name = "Donald", BirthDay = "G-11-13", StartDate = "A-01-25", ContractType = "PRTM" }; var addEmployeeValidator = new AddEmployeeValidator(); var result = addEmployeeValidator.Validate(employee); Assert.AreEqual(result.Errors.Count, 2); }