public void SummaryValidatorTest() { var summary = CreateSummary(); IValidator validator = new SummaryValidator(); var result = validator.Validate(summary); Assert.IsTrue(result.IsValid); }
public void SummaryValidatorNoValidTest() { var summary = CreateSummary(); summary.FechaEmision = DateTime.Now.AddDays(3); IValidator validator = new SummaryValidator(); var result = validator.Validate(summary); Assert.IsFalse(result.IsValid); Assert.AreEqual(1, result.Errors.Count); }