Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectLoaderMock ¶
type ProjectLoaderMock struct { // LoadFunc mocks the Load method. LoadFunc func(projectPath string) (project.Project, error) // contains filtered or unexported fields }
ProjectLoaderMock is a mock implementation of project.ProjectLoader.
func TestSomethingThatUsesProjectLoader(t *testing.T) { // make and configure a mocked project.ProjectLoader mockedProjectLoader := &ProjectLoaderMock{ LoadFunc: func(projectPath string) (project.Project, error) { panic("mock out the Load method") }, } // use mockedProjectLoader in code that requires project.ProjectLoader // and then make assertions. }
func (*ProjectLoaderMock) Load ¶
func (mock *ProjectLoaderMock) Load(projectPath string) (project.Project, error)
Load calls LoadFunc.
func (*ProjectLoaderMock) LoadCalls ¶
func (mock *ProjectLoaderMock) LoadCalls() []struct { ProjectPath string }
LoadCalls gets all the calls that were made to Load. Check the length with:
len(mockedProjectLoader.LoadCalls())
Click to show internal directories.
Click to hide internal directories.