C# Class RubberduckTests.Mocks.MockVbeBuilder

Builds a mock VBE.
Afficher le fichier Open project: retailcoder/Rubberduck Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
CreateCodePanesMock ( ) : Mock
CreateProjectsMock ( ) : Mock
CreateVbeMock ( ) : Mock

Method Details

AddProject() public méthode

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

Build() public méthode

Gets the mock VBE instance.
public Build ( ) : Mock
Résultat Mock

BuildFromSingleModule() public méthode

public BuildFromSingleModule ( string content, vbext_ComponentType type, VBComponent &component ) : Mock
content string
type vbext_ComponentType
component VBComponent
Résultat Mock

BuildFromSingleStandardModule() public méthode

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
Résultat Mock

MockVbeBuilder() public méthode

public MockVbeBuilder ( ) : System.Collections
Résultat System.Collections

ProjectBuilder() public méthode

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.
Résultat MockProjectBuilder