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