C# Class RubberduckTests.Mocks.MockVbeBuilder

Builds a mock VBE.
Show file Open project: retailcoder/Rubberduck Class Usage Examples

Public Methods

Method Description
AddProject ( Mock project ) : MockVbeBuilder

Adds a project to the mock VBE. Use a MockProjectBuilder to build the project.

Build ( ) : Mock

Gets the mock VBE instance.

BuildFromSingleModule ( string content, vbext_ComponentType type, VBComponent &component ) : Mock
BuildFromSingleStandardModule ( string content, VBComponent &component ) : Mock

Gets a mock VBE instance, containing a single "TestProject1" VBProject and a single "TestModule1" VBComponent, with the specified content.

MockVbeBuilder ( ) : System.Collections
ProjectBuilder ( string name, vbext_ProjectProtection protection ) : MockProjectBuilder

Creates a MockProjectBuilder to build a new project.

Private Methods

Method Description
CreateCodePanesMock ( ) : Mock
CreateProjectsMock ( ) : Mock
CreateVbeMock ( ) : Mock

Method Details

AddProject() public method

Adds a project to the mock VBE. Use a MockProjectBuilder to build the project.
public AddProject ( Mock project ) : MockVbeBuilder
project Mock A mock .
return MockVbeBuilder

Build() public method

Gets the mock VBE instance.
public Build ( ) : Mock
return Mock

BuildFromSingleModule() public method

public BuildFromSingleModule ( string content, vbext_ComponentType type, VBComponent &component ) : Mock
content string
type vbext_ComponentType
component VBComponent
return Mock

BuildFromSingleStandardModule() public method

Gets a mock VBE instance, containing a single "TestProject1" VBProject and a single "TestModule1" VBComponent, with the specified content.
public BuildFromSingleStandardModule ( string content, VBComponent &component ) : Mock
content string The VBA code associated to the component.
component VBComponent The created
return Mock

MockVbeBuilder() public method

public MockVbeBuilder ( ) : System.Collections
return System.Collections

ProjectBuilder() public method

Creates a MockProjectBuilder to build a new project.
public ProjectBuilder ( string name, vbext_ProjectProtection protection ) : MockProjectBuilder
name string The name of the project to build.
protection vbext_ProjectProtection A value that indicates whether the project is protected.
return MockProjectBuilder