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