C# Class Jwc.Experiment.Idioms.ObjectDisposalAssertion

Encapsulates a unit test that verifies that members throw ObjectDisposedException after its owner(object) is disposed.
Inheritance: IdiomaticAssertion
Afficher le fichier Open project: jwChung/Experimentalism Class Usage Examples

Méthodes publiques

Méthode Description
ObjectDisposalAssertion ( ISpecimenBuilder builder ) : System

Initializes a new instance of the ObjectDisposalAssertion class.

Verify ( MethodInfo method ) : void

Verifies that a method throws ObjectDisposedException after its owner(object) is disposed.

Verify ( PropertyInfo property ) : void

Verifies that a property throws ObjectDisposedException after its owner(object) is disposed.

Private Methods

Méthode Description
GetArguments ( IEnumerable parameters ) : object[]
GetOwner ( MethodInfo method ) : IDisposable
ThrowDoesNotImplementIDisposable ( MethodInfo method ) : void
ThrowDoesNotThrowObjectDisposedException ( MethodInfo method ) : void
VerifyThrowsObjectDisposedException ( IDisposable owner, MethodInfo method ) : void

Method Details

ObjectDisposalAssertion() public méthode

Initializes a new instance of the ObjectDisposalAssertion class.
public ObjectDisposalAssertion ( ISpecimenBuilder builder ) : System
builder ISpecimenBuilder /// The builder to create an owner object. ///
Résultat System

Verify() public méthode

Verifies that a method throws ObjectDisposedException after its owner(object) is disposed.
public Verify ( MethodInfo method ) : void
method System.Reflection.MethodInfo /// The method. ///
Résultat void

Verify() public méthode

Verifies that a property throws ObjectDisposedException after its owner(object) is disposed.
public Verify ( PropertyInfo property ) : void
property System.Reflection.PropertyInfo /// The property. ///
Résultat void