[英]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.