Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchmarkPhaseProviderMock ¶
type BenchmarkPhaseProviderMock struct {
// GetBenchmarkPhaseFunc mocks the GetBenchmarkPhase method.
GetBenchmarkPhaseFunc func(buildTool string, metadata common.CacheConfigMetadata) (string, error)
// contains filtered or unexported fields
}
BenchmarkPhaseProviderMock is a mock implementation of common.BenchmarkPhaseProvider.
func TestSomethingThatUsesBenchmarkPhaseProvider(t *testing.T) {
// make and configure a mocked common.BenchmarkPhaseProvider
mockedBenchmarkPhaseProvider := &BenchmarkPhaseProviderMock{
GetBenchmarkPhaseFunc: func(buildTool string, metadata common.CacheConfigMetadata) (string, error) {
panic("mock out the GetBenchmarkPhase method")
},
}
// use mockedBenchmarkPhaseProvider in code that requires common.BenchmarkPhaseProvider
// and then make assertions.
}
func (*BenchmarkPhaseProviderMock) GetBenchmarkPhase ¶
func (mock *BenchmarkPhaseProviderMock) GetBenchmarkPhase(buildTool string, metadata common.CacheConfigMetadata) (string, error)
GetBenchmarkPhase calls GetBenchmarkPhaseFunc.
func (*BenchmarkPhaseProviderMock) GetBenchmarkPhaseCalls ¶
func (mock *BenchmarkPhaseProviderMock) GetBenchmarkPhaseCalls() []struct { BuildTool string Metadata common.CacheConfigMetadata }
GetBenchmarkPhaseCalls gets all the calls that were made to GetBenchmarkPhase. Check the length with:
len(mockedBenchmarkPhaseProvider.GetBenchmarkPhaseCalls())
Click to show internal directories.
Click to hide internal directories.