public void TotalDueAmount_Is_1_Cent_Is_Valid() { // Arrange var validator = new PaymentPlanValidator(); var paymentPlan = new PaymentPlan { TotalDueAmount = 0.01M }; // Act var result = validator.Validate(paymentPlan); // Assert Assert.False(result.Errors.Any(e => e.ErrorMessage == "TotalDueAmount must be greater than 0")); }
public void TotalNumberOfPayments_Is_99_Generates_Error() { // Arrange var validator = new PaymentPlanValidator(); var paymentPlan = new PaymentPlan { TotalNumberOfPayments = 99 }; // Act var result = validator.Validate(paymentPlan); // Assert Assert.False(result.Errors.Any(e => e.ErrorMessage == "TotalNumberOfPayments must be a integer between 1 and 99")); }
public void Type_Is_Payment_Plan_PaymentAmount_Is_Zero_Is_Valid() { // Arrange var validator = new PaymentPlanValidator(); var paymentPlan = new PaymentPlan { PaymentAmount = 0M }; // Act var result = validator.Validate(paymentPlan); // Assert Assert.False(result.Errors.Any(e => e.ErrorMessage == "PaymentAmount must be greater than 0")); }