public void FinancialTransactionGroupShouldNotBeValid(string title, string description) { var group = new FinancialTransactionGroup(title, description); var validator = new FinancialTransactionGroupValidator(); var validationResult = validator.Validate(group); Assert.False(validationResult.IsValid); Assert.NotEmpty(validationResult.Errors); }
public void FinancialTransactionsShouldNotBeValid(string title, string description, double value) { var group = new FinancialTransactionGroup("Title", "Description"); group.FinancialTransactions.Add(new FinancialTransaction(title, description, value, DateTime.Now)); var validator = new FinancialTransactionGroupValidator(); var validationResult = validator.Validate(group); Assert.False(validationResult.IsValid); Assert.NotEmpty(validationResult.Errors); }