github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/api/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 // InputFromGraphQL provides a mock function with given fields: in 18 func (_m *APIConverter) InputFromGraphQL(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 // MultipleInputFromGraphQL provides a mock function with given fields: in 50 func (_m *APIConverter) MultipleInputFromGraphQL(in []*graphql.APIDefinitionInput) ([]*model.APIDefinitionInput, []*model.SpecInput, error) { 51 ret := _m.Called(in) 52 53 var r0 []*model.APIDefinitionInput 54 if rf, ok := ret.Get(0).(func([]*graphql.APIDefinitionInput) []*model.APIDefinitionInput); ok { 55 r0 = rf(in) 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).([]*model.APIDefinitionInput) 59 } 60 } 61 62 var r1 []*model.SpecInput 63 if rf, ok := ret.Get(1).(func([]*graphql.APIDefinitionInput) []*model.SpecInput); ok { 64 r1 = rf(in) 65 } else { 66 if ret.Get(1) != nil { 67 r1 = ret.Get(1).([]*model.SpecInput) 68 } 69 } 70 71 var r2 error 72 if rf, ok := ret.Get(2).(func([]*graphql.APIDefinitionInput) error); ok { 73 r2 = rf(in) 74 } else { 75 r2 = ret.Error(2) 76 } 77 78 return r0, r1, r2 79 } 80 81 // MultipleToGraphQL provides a mock function with given fields: in, specs, bundleRefs 82 func (_m *APIConverter) MultipleToGraphQL(in []*model.APIDefinition, specs []*model.Spec, bundleRefs []*model.BundleReference) ([]*graphql.APIDefinition, error) { 83 ret := _m.Called(in, specs, bundleRefs) 84 85 var r0 []*graphql.APIDefinition 86 if rf, ok := ret.Get(0).(func([]*model.APIDefinition, []*model.Spec, []*model.BundleReference) []*graphql.APIDefinition); ok { 87 r0 = rf(in, specs, bundleRefs) 88 } else { 89 if ret.Get(0) != nil { 90 r0 = ret.Get(0).([]*graphql.APIDefinition) 91 } 92 } 93 94 var r1 error 95 if rf, ok := ret.Get(1).(func([]*model.APIDefinition, []*model.Spec, []*model.BundleReference) error); ok { 96 r1 = rf(in, specs, bundleRefs) 97 } else { 98 r1 = ret.Error(1) 99 } 100 101 return r0, r1 102 } 103 104 // ToGraphQL provides a mock function with given fields: in, spec, bundleRef 105 func (_m *APIConverter) ToGraphQL(in *model.APIDefinition, spec *model.Spec, bundleRef *model.BundleReference) (*graphql.APIDefinition, error) { 106 ret := _m.Called(in, spec, bundleRef) 107 108 var r0 *graphql.APIDefinition 109 if rf, ok := ret.Get(0).(func(*model.APIDefinition, *model.Spec, *model.BundleReference) *graphql.APIDefinition); ok { 110 r0 = rf(in, spec, bundleRef) 111 } else { 112 if ret.Get(0) != nil { 113 r0 = ret.Get(0).(*graphql.APIDefinition) 114 } 115 } 116 117 var r1 error 118 if rf, ok := ret.Get(1).(func(*model.APIDefinition, *model.Spec, *model.BundleReference) error); ok { 119 r1 = rf(in, spec, bundleRef) 120 } else { 121 r1 = ret.Error(1) 122 } 123 124 return r0, r1 125 } 126 127 type mockConstructorTestingTNewAPIConverter interface { 128 mock.TestingT 129 Cleanup(func()) 130 } 131 132 // 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. 133 func NewAPIConverter(t mockConstructorTestingTNewAPIConverter) *APIConverter { 134 mock := &APIConverter{} 135 mock.Mock.Test(t) 136 137 t.Cleanup(func() { mock.AssertExpectations(t) }) 138 139 return mock 140 }