Esempio n. 1
0
        /// <summary>
        /// Selects a collection to define exclusions at.
        /// Allows to navigate deeper by using <see cref="For{TNext}"/>.
        /// </summary>
        public NestedExclusionOptionBuilder <TExpectation, TNext> For <TNext>(Expression <Func <TExpectation, IEnumerable <TNext> > > expression)
        {
            var selectionRule = new ExcludeMemberByPathSelectionRule(expression.GetMemberPath());

            AddSelectionRule(selectionRule);
            return(new NestedExclusionOptionBuilder <TExpectation, TNext>(this, selectionRule));
        }
Esempio n. 2
0
 internal NestedExclusionOptionBuilder(EquivalencyAssertionOptions <TExpectation> capturedAssertionOptions,
                                       ExcludeMemberByPathSelectionRule currentPathSelectionRule)
 {
     this.capturedAssertionOptions = capturedAssertionOptions;
     this.currentPathSelectionRule = currentPathSelectionRule;
 }