简体   繁体   English

应该与排除和不区分大小写的比较

[英]ShouldBeEquivalentTo with Exclude and case insensitivity comparison

I want to use ShouldBeEquivalentTo() of fluent Assertion, by excluding few properties and making it an case insensitive comparison. 我想通过排除一些属性并使它成为不区分大小写的比较,来使用流利的Assertion的ShouldBeEquivalentTo() For ex. 对于前。 I am comparing below 2 objects admin and lookUp by excluding LastModifiedDate and the County comparison should be case insensitive. 我正在通过排除LastModifiedDate比较以下2个对象admin和lookUp,并且County比较应该不区分大小写。 Currently i am excluding it for the condition to work out but actually it should be a case insensitive comparison for County . 目前,我将其排除在外是为了确定条件,但实际上,对于County来说,它应该是不区分大小写的比较。

admin.ShouldBeEquivalentTo(
          lookUp,
          l => l.Excluding(a => a.GroupId)
     .Excluding(a => a.LastModifiedDate)
     .Excluding(a => a.County));

Please Suggest! 请提出建议!

FluentAssertion字符串比较已经不区分大小写。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 c#文件路径字符串比较不区分大小写 - c# file path string comparison case insensitivity 流利断言 - 在ShouldBeEquivalentTo()中覆盖比较 - Fluent Assertions - Overriding comparison in ShouldBeEquivalentTo() 文本框不区分大小写不起作用 - case insensitivity on textbox not working 如何在 FluentAssertions ShouldBeEquivalentTo() 中排除多个属性 - How to exclude multiple properties in FluentAssertions ShouldBeEquivalentTo() 在自定义验证器中设置不区分大小写 - Set case insensitivity in custom validator Oracle Data Provider for Entity Framework不区分大小写 - Oracle Data Provider for Entity Framework Case Insensitivity 使用ShouldBeEquivalentTo时,如何排除IEnumerable中所有项的属性? - How do I exclude a property of all items in IEnumerable when using ShouldBeEquivalentTo? 如何使用FilterExpression且不区分大小写来过滤CRM记录? - How to filter CRM records using FilterExpression and with case insensitivity? 如何检查 Json 对象和 Json 数组中的属性不区分大小写 - how to check case insensitivity of properties in Json object and Json Arrays Asp.Net Web API ODATA 的 GROUP BY/不区分大小写扩展? - GROUP BY / Case Insensitivity extension for Asp.Net Web API ODATA?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM