C# Class Jwc.Experiment.Idioms.NotExposedReferenceAssertion

Encapsulates a unit test that verifies that certain assemblies are not exposed through public API.
Inheritance: IdiomaticAssertion
Exibir arquivo Open project: jwChung/Experimentalism Class Usage Examples

Public Methods

Method Description
NotExposedReferenceAssertion ( ) : System

Initializes a new instance of the NotExposedReferenceAssertion class.

Verify ( Assembly assembly ) : void

Verifies that an assembly does not expose the indirect references through public APIs.

Verify ( ConstructorInfo constructor ) : void

Verifies that a constructor does not expose the indirect references through public APIs.

Verify ( EventInfo @event ) : void

Verifies that an event does not expose the indirect references through public APIs.

Verify ( FieldInfo field ) : void

Verifies that a field does not expose the indirect references through public APIs.

Verify ( MethodInfo method ) : void

Verifies that a method does not expose the indirect references through public APIs.

Verify ( PropertyInfo property ) : void

Verifies that a property does not expose the indirect references through public APIs.

Verify ( Type type ) : void

Verifies that a type does not expose the indirect references through public APIs.

Private Methods

Method Description
EnsureDostNotExposeIndirectReferences ( IReflectionElement reflectionElement ) : void
GetAccessibilities ( MemberInfo member ) : Accessibilities
GetReferences ( IReflectionElement reflectionElement ) : IEnumerable
IsExposed ( MemberInfo member ) : bool

Method Details

NotExposedReferenceAssertion() public method

Initializes a new instance of the NotExposedReferenceAssertion class.
public NotExposedReferenceAssertion ( ) : System
return System

Verify() public method

Verifies that an assembly does not expose the indirect references through public APIs.
public Verify ( Assembly assembly ) : void
assembly System.Reflection.Assembly /// The assembly. ///
return void

Verify() public method

Verifies that a constructor does not expose the indirect references through public APIs.
public Verify ( ConstructorInfo constructor ) : void
constructor System.Reflection.ConstructorInfo /// The constructor. ///
return void

Verify() public method

Verifies that an event does not expose the indirect references through public APIs.
public Verify ( EventInfo @event ) : void
@event System.Reflection.EventInfo
return void

Verify() public method

Verifies that a field does not expose the indirect references through public APIs.
public Verify ( FieldInfo field ) : void
field System.Reflection.FieldInfo /// The field. ///
return void

Verify() public method

Verifies that a method does not expose the indirect references through public APIs.
public Verify ( MethodInfo method ) : void
method System.Reflection.MethodInfo /// The method. ///
return void

Verify() public method

Verifies that a property does not expose the indirect references through public APIs.
public Verify ( PropertyInfo property ) : void
property System.Reflection.PropertyInfo /// The field. ///
return void

Verify() public method

Verifies that a type does not expose the indirect references through public APIs.
public Verify ( Type type ) : void
type System.Type /// A type to be verified. ///
return void