Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LDCacheMock ¶ added in v1.15.0
type LDCacheMock struct {
// ListFunc mocks the List method.
ListFunc func() ([]string, []string)
// LookupFunc mocks the Lookup method.
LookupFunc func(strings ...string) ([]string, []string)
// contains filtered or unexported fields
}
LDCacheMock is a mock implementation of LDCache.
func TestSomethingThatUsesLDCache(t *testing.T) {
// make and configure a mocked LDCache
mockedLDCache := &LDCacheMock{
ListFunc: func() ([]string, []string) {
panic("mock out the List method")
},
LookupFunc: func(strings ...string) ([]string, []string) {
panic("mock out the Lookup method")
},
}
// use mockedLDCache in code that requires LDCache
// and then make assertions.
}
func (*LDCacheMock) List ¶ added in v1.15.0
func (mock *LDCacheMock) List() ([]string, []string)
List calls ListFunc.
func (*LDCacheMock) ListCalls ¶ added in v1.15.0
func (mock *LDCacheMock) ListCalls() []struct { }
ListCalls gets all the calls that were made to List. Check the length with:
len(mockedLDCache.ListCalls())
func (*LDCacheMock) Lookup ¶ added in v1.15.0
func (mock *LDCacheMock) Lookup(strings ...string) ([]string, []string)
Lookup calls LookupFunc.
func (*LDCacheMock) LookupCalls ¶ added in v1.15.0
func (mock *LDCacheMock) LookupCalls() []struct { Strings []string }
LookupCalls gets all the calls that were made to Lookup. Check the length with:
len(mockedLDCache.LookupCalls())
Click to show internal directories.
Click to hide internal directories.