C# 클래스 RubberduckWeb.Mocks.MockProjectBuilder

Builds a mock VBProject.
파일 보기 프로젝트 열기: rubberduck-vba/RubberduckWeb 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreateCodeModuleMock Mock
CreateCodeModuleMock Mock
CreateCodePaneMock Mock
CreateComponentMock Mock
CreateComponentsMock Mock
CreateProjectMock Mock
CreateReferenceMock Mock
CreateReferencesMock Mock

공개 메소드들

메소드 설명
AddComponent ( Mock component ) : MockProjectBuilder

Adds a new mock component to the project. Use the AddComponent(string,vbext_ComponentType,string,Selection) overload to add module components. Use this overload to add user forms created with a RubberduckTests.Mocks.MockUserFormBuilder instance.

AddComponent ( string name, vbext_ComponentType type, string content, Rubberduck.VBEditor.Selection selection = newSelection() ) : MockProjectBuilder

Adds a new component to the project.

AddReference ( string name, string filePath, bool isBuiltIn = false ) : MockProjectBuilder

Adds a mock reference to the project.

Build ( ) : Mock

Gets the mock VBProject instance.

MockProjectBuilder ( string name, string filename, vbext_ProjectProtection protection, Func getVbe, MockVbeBuilder mockVbeBuilder ) : System
MockUserFormBuilder ( string name, string content ) : MockUserFormBuilder

Creates a RubberduckTests.Mocks.MockUserFormBuilder to build a new form component.

MockVbeBuilder ( ) : MockVbeBuilder

Builds the project, adds it to the VBE, and returns a MockVbeBuilder to continue adding projects to the VBE.

비공개 메소드들

메소드 설명
CreateCodeModuleMock ( string content ) : Mock
CreateCodeModuleMock ( string name, string content, Rubberduck.VBEditor.Selection selection ) : Mock
CreateCodePaneMock ( string name, Rubberduck.VBEditor.Selection selection ) : Mock
CreateComponentMock ( string name, vbext_ComponentType type, string content, Rubberduck.VBEditor.Selection selection ) : Mock
CreateComponentsMock ( ) : Mock
CreateProjectMock ( string name, string filename, vbext_ProjectProtection protection ) : Mock
CreateReferenceMock ( string name, string filePath, bool isBuiltIn = true ) : Mock
CreateReferencesMock ( ) : Mock

메소드 상세

AddComponent() 공개 메소드

Adds a new mock component to the project. Use the AddComponent(string,vbext_ComponentType,string,Selection) overload to add module components. Use this overload to add user forms created with a RubberduckTests.Mocks.MockUserFormBuilder instance.
public AddComponent ( Mock component ) : MockProjectBuilder
component Mock The component to add.
리턴 MockProjectBuilder

AddComponent() 공개 메소드

Adds a new component to the project.
public AddComponent ( string name, vbext_ComponentType type, string content, Rubberduck.VBEditor.Selection selection = newSelection() ) : MockProjectBuilder
name string The name of the new component.
type vbext_ComponentType The type of component to create.
content string The VBA code associated to the component.
selection Rubberduck.VBEditor.Selection
리턴 MockProjectBuilder

AddReference() 공개 메소드

Adds a mock reference to the project.
public AddReference ( string name, string filePath, bool isBuiltIn = false ) : MockProjectBuilder
name string The name of the referenced library.
filePath string The path to the referenced library.
isBuiltIn bool Indicates whether the reference is a built-in reference.
리턴 MockProjectBuilder

Build() 공개 메소드

Gets the mock VBProject instance.
public Build ( ) : Mock
리턴 Mock

MockProjectBuilder() 공개 메소드

public MockProjectBuilder ( string name, string filename, vbext_ProjectProtection protection, Func getVbe, MockVbeBuilder mockVbeBuilder ) : System
name string
filename string
protection vbext_ProjectProtection
getVbe Func
mockVbeBuilder MockVbeBuilder
리턴 System

MockUserFormBuilder() 공개 메소드

Creates a RubberduckTests.Mocks.MockUserFormBuilder to build a new form component.
public MockUserFormBuilder ( string name, string content ) : MockUserFormBuilder
name string The name of the component.
content string The VBA code associated to the component.
리턴 MockUserFormBuilder

MockVbeBuilder() 공개 메소드

Builds the project, adds it to the VBE, and returns a MockVbeBuilder to continue adding projects to the VBE.
public MockVbeBuilder ( ) : MockVbeBuilder
리턴 MockVbeBuilder