package mocks
import "github.com/input-output-hk/catalyst-forge/lib/blueprint/pkg/loader/mocks"
Index ¶
- type BlueprintLoaderMock
- func (mock *BlueprintLoaderMock) Load(projectPath string, gitRootPath string) (blueprint.RawBlueprint, error)
- func (mock *BlueprintLoaderMock) LoadCalls() []struct { ProjectPath string GitRootPath string }
- func (mock *BlueprintLoaderMock) SetOverrider(overrider loader.InjectorOverrider)
- func (mock *BlueprintLoaderMock) SetOverriderCalls() []struct { Overrider loader.InjectorOverrider }
Types ¶
type BlueprintLoaderMock ¶
type BlueprintLoaderMock struct { // LoadFunc mocks the Load method. LoadFunc func(projectPath string, gitRootPath string) (blueprint.RawBlueprint, error) // SetOverriderFunc mocks the SetOverrider method. SetOverriderFunc func(overrider loader.InjectorOverrider) // contains filtered or unexported fields }
BlueprintLoaderMock is a mock implementation of loader.BlueprintLoader.
func TestSomethingThatUsesBlueprintLoader(t *testing.T) { // make and configure a mocked loader.BlueprintLoader mockedBlueprintLoader := &BlueprintLoaderMock{ LoadFunc: func(projectPath string, gitRootPath string) (blueprint.RawBlueprint, error) { panic("mock out the Load method") }, SetOverriderFunc: func(overrider loader.InjectorOverrider) { panic("mock out the SetOverrider method") }, } // use mockedBlueprintLoader in code that requires loader.BlueprintLoader // and then make assertions. }
func (*BlueprintLoaderMock) Load ¶
func (mock *BlueprintLoaderMock) Load(projectPath string, gitRootPath string) (blueprint.RawBlueprint, error)
Load calls LoadFunc.
func (*BlueprintLoaderMock) LoadCalls ¶
func (mock *BlueprintLoaderMock) LoadCalls() []struct { ProjectPath string GitRootPath string }
LoadCalls gets all the calls that were made to Load. Check the length with:
len(mockedBlueprintLoader.LoadCalls())
func (*BlueprintLoaderMock) SetOverrider ¶
func (mock *BlueprintLoaderMock) SetOverrider(overrider loader.InjectorOverrider)
SetOverrider calls SetOverriderFunc.
func (*BlueprintLoaderMock) SetOverriderCalls ¶
func (mock *BlueprintLoaderMock) SetOverriderCalls() []struct { Overrider loader.InjectorOverrider }
SetOverriderCalls gets all the calls that were made to SetOverrider. Check the length with:
len(mockedBlueprintLoader.SetOverriderCalls())
Source Files ¶
- Version
- v0.0.0-20240928203643-c3373f0052b9 (latest)
- Published
- Sep 28, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 2 days ago –
Tools for package owners.