github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/runtime/automock/webhook_service.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 12 // WebhookService is an autogenerated mock type for the WebhookService type 13 type WebhookService struct { 14 mock.Mock 15 } 16 17 // Create provides a mock function with given fields: ctx, owningResourceID, in, objectType 18 func (_m *WebhookService) Create(ctx context.Context, owningResourceID string, in model.WebhookInput, objectType model.WebhookReferenceObjectType) (string, error) { 19 ret := _m.Called(ctx, owningResourceID, in, objectType) 20 21 var r0 string 22 if rf, ok := ret.Get(0).(func(context.Context, string, model.WebhookInput, model.WebhookReferenceObjectType) string); ok { 23 r0 = rf(ctx, owningResourceID, in, objectType) 24 } else { 25 r0 = ret.Get(0).(string) 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(context.Context, string, model.WebhookInput, model.WebhookReferenceObjectType) error); ok { 30 r1 = rf(ctx, owningResourceID, in, objectType) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // ListForRuntime provides a mock function with given fields: ctx, runtimeID 39 func (_m *WebhookService) ListForRuntime(ctx context.Context, runtimeID string) ([]*model.Webhook, error) { 40 ret := _m.Called(ctx, runtimeID) 41 42 var r0 []*model.Webhook 43 if rf, ok := ret.Get(0).(func(context.Context, string) []*model.Webhook); ok { 44 r0 = rf(ctx, runtimeID) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).([]*model.Webhook) 48 } 49 } 50 51 var r1 error 52 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 53 r1 = rf(ctx, runtimeID) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 type mockConstructorTestingTNewWebhookService interface { 62 mock.TestingT 63 Cleanup(func()) 64 } 65 66 // NewWebhookService creates a new instance of WebhookService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 67 func NewWebhookService(t mockConstructorTestingTNewWebhookService) *WebhookService { 68 mock := &WebhookService{} 69 mock.Mock.Test(t) 70 71 t.Cleanup(func() { mock.AssertExpectations(t) }) 72 73 return mock 74 }