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 -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -