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
파일 보기 프로젝트 열기: Jedzia/NStub 1 사용 예제들

공개 메소드들

메소드 설명
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