public void ThrowIfNotSatisfiedThrowsNoExceptionWhenThereAreNoViolations() { BusinessRule target = new RuleThatNeverHasAViolation(); target.ThrowIfNotSatisfied(); // Assert that no exception has been thrown }
public void AndOperator_CombinesRules_CanBeWithoutAnyViolation() { BusinessRule rule1 = new RuleThatNeverHasAViolation(); BusinessRule rule2 = new RuleThatNeverHasAViolation(); BusinessRule result = rule1 & rule2; IEnumerable <BusinessRuleViolation> violations = result.CheckRule(); Assert.AreEqual(0, violations.Count()); }