C# Класс NStub.CSharp.MbUnit.CSharpMbUnitCodeGenerator

The CSharpMbUnitCodeGenerator is responsible for the generation of the individual class files with MbUnit support which will make up the actual test project. For information regarding the generation of the project file, see .
Наследование: BaseCSharpCodeGenerator, ICodeGenerator
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CSharpMbUnitCodeGenerator ( IBuildSystem buildSystem, CodeNamespace codeNamespace, IMemberBuilderFactory testBuilders, ICodeGeneratorParameters configuration ) : System

Initializes a new instance of the CSharpMbUnitCodeGenerator class based the given CodeNamespace which will output to the given directory.

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

Метод Описание
ComposeTestTearDownMethod ( CodeMemberMethod teardownMethod, CodeMemberField testObjectMemberField, string testObjectName, Type testObjectType ) : void

Compose additional items of the test TearDown method.

GenerateAdditional ( ISetupAndTearDownCreationContext context, string testObjectName, CodeMemberField testObjectMemberField ) : void

Generates additional members of the test class.

GenerateSetupAndTearDownAdditional ( ISetupAndTearDownCreationContext context, string testObjectName, CodeMemberField testObjectMemberField ) : void

Generates the setup and tear down additional members and fields.

Override this to customize the behavior of the generator.

RetrieveNamespaceImports ( ) : IEnumerable

Add namespace imports to the main compilation unit.

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

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

Initializes a new instance of the CSharpMbUnitCodeGenerator class based the given CodeNamespace which will output to the given directory.
or /// is null. is an /// empty string. /// cannot be found.
public CSharpMbUnitCodeGenerator ( IBuildSystem buildSystem, CodeNamespace codeNamespace, IMemberBuilderFactory testBuilders, ICodeGeneratorParameters configuration ) : System
buildSystem IBuildSystem The build system.
codeNamespace System.CodeDom.CodeNamespace The code namespace.
testBuilders IMemberBuilderFactory The test builder repository.
configuration ICodeGeneratorParameters The configuration of the generator.
Результат System

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

Compose additional items of the test TearDown method.
protected ComposeTestTearDownMethod ( CodeMemberMethod teardownMethod, CodeMemberField testObjectMemberField, string testObjectName, Type testObjectType ) : void
teardownMethod System.CodeDom.CodeMemberMethod A reference to the TearDown method of the test.
testObjectMemberField System.CodeDom.CodeMemberField The member field of the object under test.
testObjectName string The name of the object under test.
testObjectType System.Type Type of the object under test(OuT).
Результат void

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

Generates additional members of the test class.
protected GenerateAdditional ( ISetupAndTearDownCreationContext context, string testObjectName, CodeMemberField testObjectMemberField ) : void
context ISetupAndTearDownCreationContext Contains data specific to SetUp and TearDown test-method generation.
testObjectName string The name of the object under test.
testObjectMemberField System.CodeDom.CodeMemberField The member field of the object under test.
Результат void

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

Generates the setup and tear down additional members and fields.
Override this to customize the behavior of the generator.
protected GenerateSetupAndTearDownAdditional ( ISetupAndTearDownCreationContext context, string testObjectName, CodeMemberField testObjectMemberField ) : void
context ISetupAndTearDownCreationContext Contains data specific to SetUp and TearDown test-method generation.
testObjectName string Name of the test object.
testObjectMemberField System.CodeDom.CodeMemberField The test object member field.
Результат void

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

Add namespace imports to the main compilation unit.
protected RetrieveNamespaceImports ( ) : IEnumerable
Результат IEnumerable