github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/application/automock/application_converter.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 graphql "github.com/kyma-incubator/compass/components/director/pkg/graphql" 9 mock "github.com/stretchr/testify/mock" 10 11 model "github.com/kyma-incubator/compass/components/director/internal/model" 12 ) 13 14 // ApplicationConverter is an autogenerated mock type for the ApplicationConverter type 15 type ApplicationConverter struct { 16 mock.Mock 17 } 18 19 // CreateInputFromGraphQL provides a mock function with given fields: ctx, in 20 func (_m *ApplicationConverter) CreateInputFromGraphQL(ctx context.Context, in graphql.ApplicationRegisterInput) (model.ApplicationRegisterInput, error) { 21 ret := _m.Called(ctx, in) 22 23 var r0 model.ApplicationRegisterInput 24 if rf, ok := ret.Get(0).(func(context.Context, graphql.ApplicationRegisterInput) model.ApplicationRegisterInput); ok { 25 r0 = rf(ctx, in) 26 } else { 27 r0 = ret.Get(0).(model.ApplicationRegisterInput) 28 } 29 30 var r1 error 31 if rf, ok := ret.Get(1).(func(context.Context, graphql.ApplicationRegisterInput) error); ok { 32 r1 = rf(ctx, in) 33 } else { 34 r1 = ret.Error(1) 35 } 36 37 return r0, r1 38 } 39 40 // GraphQLToModel provides a mock function with given fields: obj, tenantID 41 func (_m *ApplicationConverter) GraphQLToModel(obj *graphql.Application, tenantID string) *model.Application { 42 ret := _m.Called(obj, tenantID) 43 44 var r0 *model.Application 45 if rf, ok := ret.Get(0).(func(*graphql.Application, string) *model.Application); ok { 46 r0 = rf(obj, tenantID) 47 } else { 48 if ret.Get(0) != nil { 49 r0 = ret.Get(0).(*model.Application) 50 } 51 } 52 53 return r0 54 } 55 56 // MultipleToGraphQL provides a mock function with given fields: in 57 func (_m *ApplicationConverter) MultipleToGraphQL(in []*model.Application) []*graphql.Application { 58 ret := _m.Called(in) 59 60 var r0 []*graphql.Application 61 if rf, ok := ret.Get(0).(func([]*model.Application) []*graphql.Application); ok { 62 r0 = rf(in) 63 } else { 64 if ret.Get(0) != nil { 65 r0 = ret.Get(0).([]*graphql.Application) 66 } 67 } 68 69 return r0 70 } 71 72 // ToGraphQL provides a mock function with given fields: in 73 func (_m *ApplicationConverter) ToGraphQL(in *model.Application) *graphql.Application { 74 ret := _m.Called(in) 75 76 var r0 *graphql.Application 77 if rf, ok := ret.Get(0).(func(*model.Application) *graphql.Application); ok { 78 r0 = rf(in) 79 } else { 80 if ret.Get(0) != nil { 81 r0 = ret.Get(0).(*graphql.Application) 82 } 83 } 84 85 return r0 86 } 87 88 // UpdateInputFromGraphQL provides a mock function with given fields: in 89 func (_m *ApplicationConverter) UpdateInputFromGraphQL(in graphql.ApplicationUpdateInput) model.ApplicationUpdateInput { 90 ret := _m.Called(in) 91 92 var r0 model.ApplicationUpdateInput 93 if rf, ok := ret.Get(0).(func(graphql.ApplicationUpdateInput) model.ApplicationUpdateInput); ok { 94 r0 = rf(in) 95 } else { 96 r0 = ret.Get(0).(model.ApplicationUpdateInput) 97 } 98 99 return r0 100 } 101 102 type mockConstructorTestingTNewApplicationConverter interface { 103 mock.TestingT 104 Cleanup(func()) 105 } 106 107 // NewApplicationConverter creates a new instance of ApplicationConverter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 108 func NewApplicationConverter(t mockConstructorTestingTNewApplicationConverter) *ApplicationConverter { 109 mock := &ApplicationConverter{} 110 mock.Mock.Test(t) 111 112 t.Cleanup(func() { mock.AssertExpectations(t) }) 113 114 return mock 115 }