Class ProtoAttributeResolver

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Resolves the ProtoTest lifecycle attributes that apply to a test method, expanding the composite attributes among them.

public static class ProtoAttributeResolver
Inheritance
ProtoAttributeResolver
Inherited Members

Methods

Expand(IEnumerable<Attribute>)

Expands the composite attributes in attributes into the attributes they declare, recursively. Every attribute handed in is an explicit declaration: it is kept, and a composed attribute identical to one of them is dropped, so an attribute that appears both explicitly and through a composite runs once. Two attributes are identical when they have the same type and the same public property values (collections compare element-wise, so Order participates). A composite whose chain reaches itself throws naming the chain.

public static IReadOnlyList<Attribute> Expand(IEnumerable<Attribute> attributes)

Parameters

attributes IEnumerable<Attribute>

Returns

IReadOnlyList<Attribute>

Resolve(MethodInfo)

Returns inherited class-level attributes followed by inherited method-level attributes, with every ProtoCompositeAttribute expanded into the attributes it declares. Lifecycle ordering is subsequently determined by Order.

public static IReadOnlyList<ProtoAttribute> Resolve(MethodInfo testMethod)

Parameters

testMethod MethodInfo

Returns

IReadOnlyList<ProtoAttribute>