github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/subscription/automock/runtime_ctx_service.go (about) 1 // Code generated by mockery v2.15.0. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 labelfilter "github.com/kyma-incubator/compass/components/director/internal/labelfilter" 9 mock "github.com/stretchr/testify/mock" 10 11 model "github.com/kyma-incubator/compass/components/director/internal/model" 12 ) 13 14 // RuntimeCtxService is an autogenerated mock type for the RuntimeCtxService type 15 type RuntimeCtxService struct { 16 mock.Mock 17 } 18 19 // Create provides a mock function with given fields: ctx, in 20 func (_m *RuntimeCtxService) Create(ctx context.Context, in model.RuntimeContextInput) (string, error) { 21 ret := _m.Called(ctx, in) 22 23 var r0 string 24 if rf, ok := ret.Get(0).(func(context.Context, model.RuntimeContextInput) string); ok { 25 r0 = rf(ctx, in) 26 } else { 27 r0 = ret.Get(0).(string) 28 } 29 30 var r1 error 31 if rf, ok := ret.Get(1).(func(context.Context, model.RuntimeContextInput) error); ok { 32 r1 = rf(ctx, in) 33 } else { 34 r1 = ret.Error(1) 35 } 36 37 return r0, r1 38 } 39 40 // Delete provides a mock function with given fields: ctx, id 41 func (_m *RuntimeCtxService) Delete(ctx context.Context, id string) error { 42 ret := _m.Called(ctx, id) 43 44 var r0 error 45 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 46 r0 = rf(ctx, id) 47 } else { 48 r0 = ret.Error(0) 49 } 50 51 return r0 52 } 53 54 // ListByFilter provides a mock function with given fields: ctx, runtimeID, filter, pageSize, cursor 55 func (_m *RuntimeCtxService) ListByFilter(ctx context.Context, runtimeID string, filter []*labelfilter.LabelFilter, pageSize int, cursor string) (*model.RuntimeContextPage, error) { 56 ret := _m.Called(ctx, runtimeID, filter, pageSize, cursor) 57 58 var r0 *model.RuntimeContextPage 59 if rf, ok := ret.Get(0).(func(context.Context, string, []*labelfilter.LabelFilter, int, string) *model.RuntimeContextPage); ok { 60 r0 = rf(ctx, runtimeID, filter, pageSize, cursor) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).(*model.RuntimeContextPage) 64 } 65 } 66 67 var r1 error 68 if rf, ok := ret.Get(1).(func(context.Context, string, []*labelfilter.LabelFilter, int, string) error); ok { 69 r1 = rf(ctx, runtimeID, filter, pageSize, cursor) 70 } else { 71 r1 = ret.Error(1) 72 } 73 74 return r0, r1 75 } 76 77 type mockConstructorTestingTNewRuntimeCtxService interface { 78 mock.TestingT 79 Cleanup(func()) 80 } 81 82 // NewRuntimeCtxService creates a new instance of RuntimeCtxService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 83 func NewRuntimeCtxService(t mockConstructorTestingTNewRuntimeCtxService) *RuntimeCtxService { 84 mock := &RuntimeCtxService{} 85 mock.Mock.Test(t) 86 87 t.Cleanup(func() { mock.AssertExpectations(t) }) 88 89 return mock 90 }