github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/kubernetes/automock/watcher.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 10 v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 11 12 watch "k8s.io/apimachinery/pkg/watch" 13 ) 14 15 // Watcher is an autogenerated mock type for the Watcher type 16 type Watcher struct { 17 mock.Mock 18 } 19 20 // Watch provides a mock function with given fields: ctx, opts 21 func (_m *Watcher) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { 22 ret := _m.Called(ctx, opts) 23 24 var r0 watch.Interface 25 if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) watch.Interface); ok { 26 r0 = rf(ctx, opts) 27 } else { 28 if ret.Get(0) != nil { 29 r0 = ret.Get(0).(watch.Interface) 30 } 31 } 32 33 var r1 error 34 if rf, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok { 35 r1 = rf(ctx, opts) 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 type mockConstructorTestingTNewWatcher interface { 44 mock.TestingT 45 Cleanup(func()) 46 } 47 48 // NewWatcher creates a new instance of Watcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 49 func NewWatcher(t mockConstructorTestingTNewWatcher) *Watcher { 50 mock := &Watcher{} 51 mock.Mock.Test(t) 52 53 t.Cleanup(func() { mock.AssertExpectations(t) }) 54 55 return mock 56 }