github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formation/automock/webhook_client.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 webhook "github.com/kyma-incubator/compass/components/director/pkg/webhook" 11 12 webhookclient "github.com/kyma-incubator/compass/components/director/pkg/webhook_client" 13 ) 14 15 // WebhookClient is an autogenerated mock type for the webhookClient type 16 type WebhookClient struct { 17 mock.Mock 18 } 19 20 // Do provides a mock function with given fields: ctx, request 21 func (_m *WebhookClient) Do(ctx context.Context, request webhookclient.WebhookRequest) (*webhook.Response, error) { 22 ret := _m.Called(ctx, request) 23 24 var r0 *webhook.Response 25 if rf, ok := ret.Get(0).(func(context.Context, webhookclient.WebhookRequest) *webhook.Response); ok { 26 r0 = rf(ctx, request) 27 } else { 28 if ret.Get(0) != nil { 29 r0 = ret.Get(0).(*webhook.Response) 30 } 31 } 32 33 var r1 error 34 if rf, ok := ret.Get(1).(func(context.Context, webhookclient.WebhookRequest) error); ok { 35 r1 = rf(ctx, request) 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 type mockConstructorTestingTNewWebhookClient interface { 44 mock.TestingT 45 Cleanup(func()) 46 } 47 48 // NewWebhookClient creates a new instance of WebhookClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 49 func NewWebhookClient(t mockConstructorTestingTNewWebhookClient) *WebhookClient { 50 mock := &WebhookClient{} 51 mock.Mock.Test(t) 52 53 t.Cleanup(func() { mock.AssertExpectations(t) }) 54 55 return mock 56 }