AttributeExistsConstraint 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
AttributeExistsConstraint 测试类型上是否存在指定属性。
public class AttributeExistsConstraint : NUnit.Framework.Constraints.Constraint
type AttributeExistsConstraint = class
inherit Constraint
- 继承
构造函数
AttributeExistsConstraint(Type) |
为特定属性类型构造 AttributeExistsConstraint |
字段
actual |
针对约束测试的实际值 (继承自 Constraint) |
属性
And |
通过将 And 追加到当前约束,返回 ConstraintExpression。 (继承自 Constraint) |
DisplayName |
此约束的显示名称,供 ToString () 使用。 默认值是删除了尾随“Constraint”的约束的名称。 派生类可能会将其设置为其构造函数中的另一个名称。 (继承自 Constraint) |
Or |
通过将 Or 追加到当前约束,返回 ConstraintExpression。 (继承自 Constraint) |
With |
通过将 And 追加到当前约束,返回 ConstraintExpression。 (继承自 Constraint) |
方法
After(Int32, Int32) |
AttributeExistsConstraint 测试类型上是否存在指定属性。 (继承自 Constraint) |
After(Int32) |
AttributeExistsConstraint 测试类型上是否存在指定属性。 (继承自 Constraint) |
GetStringRepresentation() |
AttributeExistsConstraint 测试类型上是否存在指定属性。 (继承自 Constraint) |
Matches(Object) |
测试对象是否提供预期的属性。 |
Matches<T>(ActualValueDelegate<T>) |
AttributeExistsConstraint 测试类型上是否存在指定属性。 (继承自 Constraint) |
Matches<T>(T) |
AttributeExistsConstraint 测试类型上是否存在指定属性。 (继承自 Constraint) |
ToString() |
ToString 的默认替代返回约束 DisplayName,后跟尖括号内的任何参数。 (继承自 Constraint) |
WriteActualValueTo(MessageWriter) |
将失败约束测试的实际值写入 MessageWriter。 默认实现只是写入实际的原始值,让编写器执行任何格式设置。 (继承自 Constraint) |
WriteDescriptionTo(MessageWriter) |
将约束的说明写入指定的编写器 |
WriteMessageTo(MessageWriter) |
将失败消息写入作为参数提供的 MessageWriter。 默认实现只是将约束和实际值传递给编写器,然后编写器会显示约束说明和值。 需要提供其他详细信息(例如发生错误的位置)的约束可以替代此错误。 (继承自 Constraint) |
显式接口实现
IResolveConstraint.Resolve() |
AttributeExistsConstraint 测试类型上是否存在指定属性。 (继承自 Constraint) |