示例#1
0
        public void ThrowIfNotSatisfiedThrowsNoExceptionWhenThereAreNoViolations()
        {
            BusinessRule target = new RuleThatNeverHasAViolation();

            target.ThrowIfNotSatisfied();

            // Assert that no exception has been thrown
        }
示例#2
0
        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());
        }