Documentation
¶
Index ¶
- type ClienterMock
- func (mock *ClienterMock) Checker(ctx context.Context, check *health.CheckState) error
- func (mock *ClienterMock) CheckerCalls() []struct{ ... }
- func (mock *ClienterMock) GetCacheTimes(ctx context.Context, auth sdk.Auth, options sdk.Options) (*models.CacheTimesList, apiError.Error)
- func (mock *ClienterMock) GetCacheTimesCalls() []struct{ ... }
- func (mock *ClienterMock) Health() *healthcheck.Client
- func (mock *ClienterMock) HealthCalls() []struct{}
- func (mock *ClienterMock) URL() string
- func (mock *ClienterMock) URLCalls() []struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClienterMock ¶
type ClienterMock struct {
// CheckerFunc mocks the Checker method.
CheckerFunc func(ctx context.Context, check *health.CheckState) error
// GetCacheTimesFunc mocks the GetCacheTimes method.
GetCacheTimesFunc func(ctx context.Context, auth sdk.Auth, options sdk.Options) (*models.CacheTimesList, apiError.Error)
// HealthFunc mocks the Health method.
HealthFunc func() *healthcheck.Client
// URLFunc mocks the URL method.
URLFunc func() string
// contains filtered or unexported fields
}
ClienterMock is a mock implementation of sdk.Clienter.
func TestSomethingThatUsesClienter(t *testing.T) {
// make and configure a mocked sdk.Clienter
mockedClienter := &ClienterMock{
CheckerFunc: func(ctx context.Context, check *health.CheckState) error {
panic("mock out the Checker method")
},
GetCacheTimesFunc: func(ctx context.Context, auth sdk.Auth, options sdk.Options) (*models.CacheTimesList, apiError.Error) {
panic("mock out the GetCacheTimes method")
},
HealthFunc: func() *healthcheck.Client {
panic("mock out the Health method")
},
URLFunc: func() string {
panic("mock out the URL method")
},
}
// use mockedClienter in code that requires sdk.Clienter
// and then make assertions.
}
func (*ClienterMock) Checker ¶
func (mock *ClienterMock) Checker(ctx context.Context, check *health.CheckState) error
Checker calls CheckerFunc.
func (*ClienterMock) CheckerCalls ¶
func (mock *ClienterMock) CheckerCalls() []struct { Ctx context.Context Check *health.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedClienter.CheckerCalls())
func (*ClienterMock) GetCacheTimes ¶
func (mock *ClienterMock) GetCacheTimes(ctx context.Context, auth sdk.Auth, options sdk.Options) (*models.CacheTimesList, apiError.Error)
GetCacheTimes calls GetCacheTimesFunc.
func (*ClienterMock) GetCacheTimesCalls ¶
func (mock *ClienterMock) GetCacheTimesCalls() []struct { Ctx context.Context Auth sdk.Auth Options sdk.Options }
GetCacheTimesCalls gets all the calls that were made to GetCacheTimes. Check the length with:
len(mockedClienter.GetCacheTimesCalls())
func (*ClienterMock) Health ¶
func (mock *ClienterMock) Health() *healthcheck.Client
Health calls HealthFunc.
func (*ClienterMock) HealthCalls ¶
func (mock *ClienterMock) HealthCalls() []struct { }
HealthCalls gets all the calls that were made to Health. Check the length with:
len(mockedClienter.HealthCalls())
func (*ClienterMock) URLCalls ¶
func (mock *ClienterMock) URLCalls() []struct { }
URLCalls gets all the calls that were made to URL. Check the length with:
len(mockedClienter.URLCalls())
Click to show internal directories.
Click to hide internal directories.