c# - How to exclude multiple properties in FluentAssertions ShouldBeEquivalentTo() -


using fluentassertions:
i'm able exclude single property using shouldbeequivalentto.

x.shouldbeequivalentto(y, opts => opts.excluding(si => !si.propertyinfo.canwrite)); 

but, how exclude more 1 property when using shouldbeequivalentto() ?

you 'll have use function instead of expression.

x.shouldbeequivalentto(y, excludeproperties);   private equivalencyassertionoptions<xx> excludeproperties(equivalencyassertionoptions<xx> options)     {             options.excluding(t => t.ceoperator);             options.excluding(t => t.ceoperatorname);             options.excluding(t => t.status);             options.excluding(t => t.isoperational);             return options;     } 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -