Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlueprintInjectorMapMock ¶
type BlueprintInjectorMapMock struct { // GetFunc mocks the Get method. GetFunc func(ctx *cue.Context, name string, attrType injector.AttrType) (cue.Value, error) // contains filtered or unexported fields }
BlueprintInjectorMapMock is a mock implementation of injector.BlueprintInjectorMap.
func TestSomethingThatUsesBlueprintInjectorMap(t *testing.T) { // make and configure a mocked injector.BlueprintInjectorMap mockedBlueprintInjectorMap := &BlueprintInjectorMapMock{ GetFunc: func(ctx *cue.Context, name string, attrType injector.AttrType) (cue.Value, error) { panic("mock out the Get method") }, } // use mockedBlueprintInjectorMap in code that requires injector.BlueprintInjectorMap // and then make assertions. }
type BlueprintInjectorMock ¶
type BlueprintInjectorMock struct { // InjectFunc mocks the Inject method. InjectFunc func(bp blueprint.RawBlueprint) blueprint.RawBlueprint // contains filtered or unexported fields }
BlueprintInjectorMock is a mock implementation of injector.BlueprintInjector.
func TestSomethingThatUsesBlueprintInjector(t *testing.T) { // make and configure a mocked injector.BlueprintInjector mockedBlueprintInjector := &BlueprintInjectorMock{ InjectFunc: func(bp blueprint.RawBlueprint) blueprint.RawBlueprint { panic("mock out the Inject method") }, } // use mockedBlueprintInjector in code that requires injector.BlueprintInjector // and then make assertions. }
func (*BlueprintInjectorMock) Inject ¶
func (mock *BlueprintInjectorMock) Inject(bp blueprint.RawBlueprint) blueprint.RawBlueprint
Inject calls InjectFunc.
func (*BlueprintInjectorMock) InjectCalls ¶
func (mock *BlueprintInjectorMock) InjectCalls() []struct { Bp blueprint.RawBlueprint }
InjectCalls gets all the calls that were made to Inject. Check the length with:
len(mockedBlueprintInjector.InjectCalls())
Click to show internal directories.
Click to hide internal directories.