Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockConfig ¶
type MockConfig struct { // GetCreationRequestTimeoutFunc mocks the GetCreationRequestTimeout method. GetCreationRequestTimeoutFunc func() time.Duration // SetCreationRequestTimeoutFunc mocks the SetCreationRequestTimeout method. SetCreationRequestTimeoutFunc func(value time.Duration) // contains filtered or unexported fields }
MockConfig is a mock implementation of config.IConfig.
func TestSomethingThatUsesIConfig(t *testing.T) { // make and configure a mocked config.IConfig mockedIConfig := &MockConfig{ GetCreationRequestTimeoutFunc: func() time.Duration { panic("mock out the GetCreationRequestTimeout method") }, SetCreationRequestTimeoutFunc: func(value time.Duration) { panic("mock out the SetCreationRequestTimeout method") }, } // use mockedIConfig in code that requires config.IConfig // and then make assertions. }
func (*MockConfig) GetCreationRequestTimeout ¶
func (mock *MockConfig) GetCreationRequestTimeout() time.Duration
GetCreationRequestTimeout calls GetCreationRequestTimeoutFunc.
func (*MockConfig) GetCreationRequestTimeoutCalls ¶
func (mock *MockConfig) GetCreationRequestTimeoutCalls() []struct { }
GetCreationRequestTimeoutCalls gets all the calls that were made to GetCreationRequestTimeout. Check the length with:
len(mockedIConfig.GetCreationRequestTimeoutCalls())
func (*MockConfig) SetCreationRequestTimeout ¶
func (mock *MockConfig) SetCreationRequestTimeout(value time.Duration)
SetCreationRequestTimeout calls SetCreationRequestTimeoutFunc.
func (*MockConfig) SetCreationRequestTimeoutCalls ¶
func (mock *MockConfig) SetCreationRequestTimeoutCalls() []struct { Value time.Duration }
SetCreationRequestTimeoutCalls gets all the calls that were made to SetCreationRequestTimeout. Check the length with:
len(mockedIConfig.SetCreationRequestTimeoutCalls())
Click to show internal directories.
Click to hide internal directories.