Moq - It.IsInRange(TValue from, TValue to, Range rangeKind) 中的范围是什么?

标签 moq

我已经在谷歌上搜索了 Range 参数的作用的解释,但一无所获,所以我相信你会解释使用 It.IsInRange(TValue from, TValue to, Range rangeKind) 时设置 Range.Inclusive 或 Range.Exclusive 的区别。 ?

最佳答案

我不确定,但我认为 inclusive 意味着您为范围提供的值是范围的一部分,而exclusive 意味着它们不是范围的一部分:

包括:下限 <= x <= 上限

排他性:下限 < x < 上限

关于Moq - It.IsInRange(TValue from, TValue to, Range rangeKind) 中的范围是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8091965/

相关文章:

c# - 在最小起订量中重置模拟验证?

c# - 模拟复杂的第 3 方库

c# - 使用计数方法

asp.net-web-api - 单元测试 WebApi2 传递 header 值

c# - 如何模拟IElasticClient的Get方法?

c# - 使用反射模拟属性 Getter 抛出异常

c# - Redis 缓存的最小起订量单元测试

unit-testing - 模拟存储库的插入方法

c# - 模拟存储库返回 null

unit-testing - 方法设置中的 Moq 匹配和验证数组/IEnumerable 参数