github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/eventdef/automock/event_def_service.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 model "github.com/kyma-incubator/compass/components/director/internal/model" 11 12 resource "github.com/kyma-incubator/compass/components/director/pkg/resource" 13 ) 14 15 // EventDefService is an autogenerated mock type for the EventDefService type 16 type EventDefService struct { 17 mock.Mock 18 } 19 20 // CreateInApplication provides a mock function with given fields: ctx, appID, in, spec 21 func (_m *EventDefService) CreateInApplication(ctx context.Context, appID string, in model.EventDefinitionInput, spec *model.SpecInput) (string, error) { 22 ret := _m.Called(ctx, appID, in, spec) 23 24 var r0 string 25 if rf, ok := ret.Get(0).(func(context.Context, string, model.EventDefinitionInput, *model.SpecInput) string); ok { 26 r0 = rf(ctx, appID, in, spec) 27 } else { 28 r0 = ret.Get(0).(string) 29 } 30 31 var r1 error 32 if rf, ok := ret.Get(1).(func(context.Context, string, model.EventDefinitionInput, *model.SpecInput) error); ok { 33 r1 = rf(ctx, appID, in, spec) 34 } else { 35 r1 = ret.Error(1) 36 } 37 38 return r0, r1 39 } 40 41 // CreateInBundle provides a mock function with given fields: ctx, resourceType, resourceID, bundleID, in, spec 42 func (_m *EventDefService) CreateInBundle(ctx context.Context, resourceType resource.Type, resourceID string, bundleID string, in model.EventDefinitionInput, spec *model.SpecInput) (string, error) { 43 ret := _m.Called(ctx, resourceType, resourceID, bundleID, in, spec) 44 45 var r0 string 46 if rf, ok := ret.Get(0).(func(context.Context, resource.Type, string, string, model.EventDefinitionInput, *model.SpecInput) string); ok { 47 r0 = rf(ctx, resourceType, resourceID, bundleID, in, spec) 48 } else { 49 r0 = ret.Get(0).(string) 50 } 51 52 var r1 error 53 if rf, ok := ret.Get(1).(func(context.Context, resource.Type, string, string, model.EventDefinitionInput, *model.SpecInput) error); ok { 54 r1 = rf(ctx, resourceType, resourceID, bundleID, in, spec) 55 } else { 56 r1 = ret.Error(1) 57 } 58 59 return r0, r1 60 } 61 62 // Delete provides a mock function with given fields: ctx, resourceType, id 63 func (_m *EventDefService) Delete(ctx context.Context, resourceType resource.Type, id string) error { 64 ret := _m.Called(ctx, resourceType, id) 65 66 var r0 error 67 if rf, ok := ret.Get(0).(func(context.Context, resource.Type, string) error); ok { 68 r0 = rf(ctx, resourceType, id) 69 } else { 70 r0 = ret.Error(0) 71 } 72 73 return r0 74 } 75 76 // Get provides a mock function with given fields: ctx, id 77 func (_m *EventDefService) Get(ctx context.Context, id string) (*model.EventDefinition, error) { 78 ret := _m.Called(ctx, id) 79 80 var r0 *model.EventDefinition 81 if rf, ok := ret.Get(0).(func(context.Context, string) *model.EventDefinition); ok { 82 r0 = rf(ctx, id) 83 } else { 84 if ret.Get(0) != nil { 85 r0 = ret.Get(0).(*model.EventDefinition) 86 } 87 } 88 89 var r1 error 90 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 91 r1 = rf(ctx, id) 92 } else { 93 r1 = ret.Error(1) 94 } 95 96 return r0, r1 97 } 98 99 // ListByApplicationIDPage provides a mock function with given fields: ctx, appID, pageSize, cursor 100 func (_m *EventDefService) ListByApplicationIDPage(ctx context.Context, appID string, pageSize int, cursor string) (*model.EventDefinitionPage, error) { 101 ret := _m.Called(ctx, appID, pageSize, cursor) 102 103 var r0 *model.EventDefinitionPage 104 if rf, ok := ret.Get(0).(func(context.Context, string, int, string) *model.EventDefinitionPage); ok { 105 r0 = rf(ctx, appID, pageSize, cursor) 106 } else { 107 if ret.Get(0) != nil { 108 r0 = ret.Get(0).(*model.EventDefinitionPage) 109 } 110 } 111 112 var r1 error 113 if rf, ok := ret.Get(1).(func(context.Context, string, int, string) error); ok { 114 r1 = rf(ctx, appID, pageSize, cursor) 115 } else { 116 r1 = ret.Error(1) 117 } 118 119 return r0, r1 120 } 121 122 // ListFetchRequests provides a mock function with given fields: ctx, eventDefIDs 123 func (_m *EventDefService) ListFetchRequests(ctx context.Context, eventDefIDs []string) ([]*model.FetchRequest, error) { 124 ret := _m.Called(ctx, eventDefIDs) 125 126 var r0 []*model.FetchRequest 127 if rf, ok := ret.Get(0).(func(context.Context, []string) []*model.FetchRequest); ok { 128 r0 = rf(ctx, eventDefIDs) 129 } else { 130 if ret.Get(0) != nil { 131 r0 = ret.Get(0).([]*model.FetchRequest) 132 } 133 } 134 135 var r1 error 136 if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { 137 r1 = rf(ctx, eventDefIDs) 138 } else { 139 r1 = ret.Error(1) 140 } 141 142 return r0, r1 143 } 144 145 // Update provides a mock function with given fields: ctx, resourceType, id, in, spec 146 func (_m *EventDefService) Update(ctx context.Context, resourceType resource.Type, id string, in model.EventDefinitionInput, spec *model.SpecInput) error { 147 ret := _m.Called(ctx, resourceType, id, in, spec) 148 149 var r0 error 150 if rf, ok := ret.Get(0).(func(context.Context, resource.Type, string, model.EventDefinitionInput, *model.SpecInput) error); ok { 151 r0 = rf(ctx, resourceType, id, in, spec) 152 } else { 153 r0 = ret.Error(0) 154 } 155 156 return r0 157 } 158 159 // UpdateForApplication provides a mock function with given fields: ctx, id, in, specIn 160 func (_m *EventDefService) UpdateForApplication(ctx context.Context, id string, in model.EventDefinitionInput, specIn *model.SpecInput) error { 161 ret := _m.Called(ctx, id, in, specIn) 162 163 var r0 error 164 if rf, ok := ret.Get(0).(func(context.Context, string, model.EventDefinitionInput, *model.SpecInput) error); ok { 165 r0 = rf(ctx, id, in, specIn) 166 } else { 167 r0 = ret.Error(0) 168 } 169 170 return r0 171 } 172 173 type mockConstructorTestingTNewEventDefService interface { 174 mock.TestingT 175 Cleanup(func()) 176 } 177 178 // NewEventDefService creates a new instance of EventDefService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 179 func NewEventDefService(t mockConstructorTestingTNewEventDefService) *EventDefService { 180 mock := &EventDefService{} 181 mock.Mock.Test(t) 182 183 t.Cleanup(func() { mock.AssertExpectations(t) }) 184 185 return mock 186 }