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