C# Класс Testeroids.ContextSpecificationBase

Наследование: IContextSpecification
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Act void
BaseSetUp void
BaseTestFixtureSetUp void
BaseTestFixtureTearDown void
ContextSpecificationBase System
DisposeContext void
EstablishContext void
GetNumberOfTestsInTestFixture int
IContextSpecification void
InstantiateMocks void
OutputContextTypeName void
PreTestFixtureSetUp void
RegisterTestFixtureWithAspects void

Защищенные методы

Метод Описание
Because ( ) : void

The because method as overridable by the user of Testeroids. Will be called by Act.

Because will be injected through AOP on entering a test method. Internally, Act does make sure any verified mock created by the MockRepository has its recorded calls reset. This means that any call to a mocked method will "forget" about the method calls done prior to calling Because.

InitializeSubjectUnderTest ( ) : void

Performs additional initialization after the subject under test has been created.

RunPrerequisites ( ) : void

This will be called before the actual assert method. Executes all methods in the context marked with the PrerequisiteAttribute.

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

Метод Описание
Act ( ) : void

This will be called by the InstrumentTestsAspect aspect. Performs the "Act" part, or the logic which is to be tested.

BaseSetUp ( ) : void
BaseTestFixtureSetUp ( ) : void
BaseTestFixtureTearDown ( ) : void
ContextSpecificationBase ( ) : System

Initializes static members of the ContextSpecificationBase class.

DisposeContext ( ) : void
EstablishContext ( ) : void
GetNumberOfTestsInTestFixture ( ) : int

Calculates the number of tests (marked with TestAttribute) in this test fixture.

IContextSpecification ( MethodBase testMethodInfo, bool isExceptionResilient ) : void

This will be called by the InstrumentTestsAspect aspect. Rethrows any exception logged during the test run.

InstantiateMocks ( ) : void
OutputContextTypeName ( Type contextType ) : void
PreTestFixtureSetUp ( ) : void
RegisterTestFixtureWithAspects ( ) : void

Registers this context with each attribute derived from TestFixtureSetupAttributeBase. Those attributes will get invoked for setup and teardown notifications.

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

Because() защищенный абстрактный Метод

The because method as overridable by the user of Testeroids. Will be called by Act.
Because will be injected through AOP on entering a test method. Internally, Act does make sure any verified mock created by the MockRepository has its recorded calls reset. This means that any call to a mocked method will "forget" about the method calls done prior to calling Because.
protected abstract Because ( ) : void
Результат void

InitializeSubjectUnderTest() защищенный абстрактный Метод

Performs additional initialization after the subject under test has been created.
protected abstract InitializeSubjectUnderTest ( ) : void
Результат void

RunPrerequisites() защищенный Метод

This will be called before the actual assert method. Executes all methods in the context marked with the PrerequisiteAttribute.
protected RunPrerequisites ( ) : void
Результат void