github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/open_resource_discovery/automock/client.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 model "github.com/kyma-incubator/compass/components/director/internal/model" 9 mock "github.com/stretchr/testify/mock" 10 11 ord "github.com/kyma-incubator/compass/components/director/internal/open_resource_discovery" 12 ) 13 14 // Client is an autogenerated mock type for the Client type 15 type Client struct { 16 mock.Mock 17 } 18 19 // FetchOpenResourceDiscoveryDocuments provides a mock function with given fields: ctx, resource, webhook 20 func (_m *Client) FetchOpenResourceDiscoveryDocuments(ctx context.Context, resource ord.Resource, webhook *model.Webhook) (ord.Documents, string, error) { 21 ret := _m.Called(ctx, resource, webhook) 22 23 var r0 ord.Documents 24 if rf, ok := ret.Get(0).(func(context.Context, ord.Resource, *model.Webhook) ord.Documents); ok { 25 r0 = rf(ctx, resource, webhook) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(ord.Documents) 29 } 30 } 31 32 var r1 string 33 if rf, ok := ret.Get(1).(func(context.Context, ord.Resource, *model.Webhook) string); ok { 34 r1 = rf(ctx, resource, webhook) 35 } else { 36 r1 = ret.Get(1).(string) 37 } 38 39 var r2 error 40 if rf, ok := ret.Get(2).(func(context.Context, ord.Resource, *model.Webhook) error); ok { 41 r2 = rf(ctx, resource, webhook) 42 } else { 43 r2 = ret.Error(2) 44 } 45 46 return r0, r1, r2 47 } 48 49 type mockConstructorTestingTNewClient interface { 50 mock.TestingT 51 Cleanup(func()) 52 } 53 54 // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 55 func NewClient(t mockConstructorTestingTNewClient) *Client { 56 mock := &Client{} 57 mock.Mock.Test(t) 58 59 t.Cleanup(func() { mock.AssertExpectations(t) }) 60 61 return mock 62 }