C# Класс Jwc.Experiment.Idioms.ObjectDisposalAssertion

Encapsulates a unit test that verifies that members throw ObjectDisposedException after its owner(object) is disposed.
Наследование: IdiomaticAssertion
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetArguments ( IEnumerable parameters ) : object[]
GetOwner ( MethodInfo method ) : IDisposable
ThrowDoesNotImplementIDisposable ( MethodInfo method ) : void
ThrowDoesNotThrowObjectDisposedException ( MethodInfo method ) : void
VerifyThrowsObjectDisposedException ( IDisposable owner, MethodInfo method ) : void

Описание методов

ObjectDisposalAssertion() публичный Метод

Initializes a new instance of the ObjectDisposalAssertion class.
public ObjectDisposalAssertion ( ISpecimenBuilder builder ) : System
builder ISpecimenBuilder /// The builder to create an owner object. ///
Результат System

Verify() публичный Метод

Verifies that a method throws ObjectDisposedException after its owner(object) is disposed.
public Verify ( MethodInfo method ) : void
method System.Reflection.MethodInfo /// The method. ///
Результат void

Verify() публичный Метод

Verifies that a property throws ObjectDisposedException after its owner(object) is disposed.
public Verify ( PropertyInfo property ) : void
property System.Reflection.PropertyInfo /// The property. ///
Результат void