/// <summary>
 ///     Adds an assertion rule to the ones already added by default, and which is evaluated before all existing rules.
 /// </summary>
 public TSelf Using(IAssertionRule assertionRule)
 {
     userEquivalencySteps.Insert(0, new AssertionRuleEquivalencyStepAdapter(assertionRule));
     return((TSelf)this);
 }
 public AssertionRuleEquivalencyStepAdapter(IAssertionRule assertionRule)
 {
     this.assertionRule = assertionRule;
 }
Example #3
0
 /// <summary>
 /// Adds a matching rule to the ones already added by default, and which is evaluated before all existing rules.
 /// NOTE: These matching rules do not apply to the root object.
 /// </summary>
 public EquivalencyAssertionOptions <TSubject> Using(IAssertionRule assertionRule)
 {
     assertionRules.Insert(0, assertionRule);
     return(this);
 }
 public AssertionRuleEquivalencyStepAdapter(IAssertionRule assertionRule)
 {
     this.assertionRule = assertionRule;
 }
 public CollectionMemberAssertionRuleDecorator(IAssertionRule equivalencyStep)
 {
     assertionRule = equivalencyStep;
 }
Example #6
0
        public AssertionResult Validate(IAssertionRule rule)
        {
            this.rules.Add(rule);

            return(this.Execute());
        }
Example #7
0
        public Asserter Add(IAssertionRule rule)
        {
            this.rules.Add(rule);

            return(this);
        }