예제 #1
0
        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);
        }
예제 #2
0
        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);
        }