// Code generated by moq; DO NOT EDIT. // github.com/matryer/moq package mgmt import ( "sync" "github.com/umputun/reproxy/app/discovery" ) // Ensure, that InformerMock does implement Informer. // If this is not the case, regenerate this file with moq. var _ Informer = &InformerMock{} // InformerMock is a mock implementation of Informer. // // func TestSomethingThatUsesInformer(t *testing.T) { // // // make and configure a mocked Informer // mockedInformer := &InformerMock{ // MappersFunc: func() []discovery.URLMapper { // panic("mock out the Mappers method") // }, // } // // // use mockedInformer in code that requires Informer // // and then make assertions. // // } type InformerMock struct { // MappersFunc mocks the Mappers method. MappersFunc func() []discovery.URLMapper // calls tracks calls to the methods. calls struct { // Mappers holds details about calls to the Mappers method. Mappers []struct { } } lockMappers sync.RWMutex } // Mappers calls MappersFunc. func (mock *InformerMock) Mappers() []discovery.URLMapper { if mock.MappersFunc == nil { panic("InformerMock.MappersFunc: method is nil but Informer.Mappers was just called") } callInfo := struct { }{} mock.lockMappers.Lock() mock.calls.Mappers = append(mock.calls.Mappers, callInfo) mock.lockMappers.Unlock() return mock.MappersFunc() } // MappersCalls gets all the calls that were made to Mappers. // Check the length with: // len(mockedInformer.MappersCalls()) func (mock *InformerMock) MappersCalls() []struct { } { var calls []struct { } mock.lockMappers.RLock() calls = mock.calls.Mappers mock.lockMappers.RUnlock() return calls }