github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/nsadapter/handler/automock/application_service.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import ( 6 context "context" 7 8 labelfilter "github.com/kyma-incubator/compass/components/director/internal/labelfilter" 9 10 mock "github.com/stretchr/testify/mock" 11 12 model "github.com/kyma-incubator/compass/components/director/internal/model" 13 ) 14 15 // ApplicationService is an autogenerated mock type for the applicationService type 16 type ApplicationService struct { 17 mock.Mock 18 } 19 20 // CreateFromTemplate provides a mock function with given fields: ctx, in, appTemplateID 21 func (_m *ApplicationService) CreateFromTemplate(ctx context.Context, in model.ApplicationRegisterInput, appTemplateID *string) (string, error) { 22 ret := _m.Called(ctx, in, appTemplateID) 23 24 var r0 string 25 if rf, ok := ret.Get(0).(func(context.Context, model.ApplicationRegisterInput, *string) string); ok { 26 r0 = rf(ctx, in, appTemplateID) 27 } else { 28 r0 = ret.Get(0).(string) 29 } 30 31 var r1 error 32 if rf, ok := ret.Get(1).(func(context.Context, model.ApplicationRegisterInput, *string) error); ok { 33 r1 = rf(ctx, in, appTemplateID) 34 } else { 35 r1 = ret.Error(1) 36 } 37 38 return r0, r1 39 } 40 41 // GetLabel provides a mock function with given fields: ctx, applicationID, key 42 func (_m *ApplicationService) GetLabel(ctx context.Context, applicationID string, key string) (*model.Label, error) { 43 ret := _m.Called(ctx, applicationID, key) 44 45 var r0 *model.Label 46 if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Label); ok { 47 r0 = rf(ctx, applicationID, key) 48 } else { 49 if ret.Get(0) != nil { 50 r0 = ret.Get(0).(*model.Label) 51 } 52 } 53 54 var r1 error 55 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 56 r1 = rf(ctx, applicationID, key) 57 } else { 58 r1 = ret.Error(1) 59 } 60 61 return r0, r1 62 } 63 64 // GetSccSystem provides a mock function with given fields: ctx, sccSubaccount, locationID, virtualHost 65 func (_m *ApplicationService) GetSccSystem(ctx context.Context, sccSubaccount string, locationID string, virtualHost string) (*model.Application, error) { 66 ret := _m.Called(ctx, sccSubaccount, locationID, virtualHost) 67 68 var r0 *model.Application 69 if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.Application); ok { 70 r0 = rf(ctx, sccSubaccount, locationID, virtualHost) 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(*model.Application) 74 } 75 } 76 77 var r1 error 78 if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { 79 r1 = rf(ctx, sccSubaccount, locationID, virtualHost) 80 } else { 81 r1 = ret.Error(1) 82 } 83 84 return r0, r1 85 } 86 87 // ListBySCC provides a mock function with given fields: ctx, filter 88 func (_m *ApplicationService) ListBySCC(ctx context.Context, filter *labelfilter.LabelFilter) ([]*model.ApplicationWithLabel, error) { 89 ret := _m.Called(ctx, filter) 90 91 var r0 []*model.ApplicationWithLabel 92 if rf, ok := ret.Get(0).(func(context.Context, *labelfilter.LabelFilter) []*model.ApplicationWithLabel); ok { 93 r0 = rf(ctx, filter) 94 } else { 95 if ret.Get(0) != nil { 96 r0 = ret.Get(0).([]*model.ApplicationWithLabel) 97 } 98 } 99 100 var r1 error 101 if rf, ok := ret.Get(1).(func(context.Context, *labelfilter.LabelFilter) error); ok { 102 r1 = rf(ctx, filter) 103 } else { 104 r1 = ret.Error(1) 105 } 106 107 return r0, r1 108 } 109 110 // ListSCCs provides a mock function with given fields: ctx 111 func (_m *ApplicationService) ListSCCs(ctx context.Context) ([]*model.SccMetadata, error) { 112 ret := _m.Called(ctx) 113 114 var r0 []*model.SccMetadata 115 if rf, ok := ret.Get(0).(func(context.Context) []*model.SccMetadata); ok { 116 r0 = rf(ctx) 117 } else { 118 if ret.Get(0) != nil { 119 r0 = ret.Get(0).([]*model.SccMetadata) 120 } 121 } 122 123 var r1 error 124 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 125 r1 = rf(ctx) 126 } else { 127 r1 = ret.Error(1) 128 } 129 130 return r0, r1 131 } 132 133 // SetLabel provides a mock function with given fields: ctx, label 134 func (_m *ApplicationService) SetLabel(ctx context.Context, label *model.LabelInput) error { 135 ret := _m.Called(ctx, label) 136 137 var r0 error 138 if rf, ok := ret.Get(0).(func(context.Context, *model.LabelInput) error); ok { 139 r0 = rf(ctx, label) 140 } else { 141 r0 = ret.Error(0) 142 } 143 144 return r0 145 } 146 147 // Update provides a mock function with given fields: ctx, id, in 148 func (_m *ApplicationService) Update(ctx context.Context, id string, in model.ApplicationUpdateInput) error { 149 ret := _m.Called(ctx, id, in) 150 151 var r0 error 152 if rf, ok := ret.Get(0).(func(context.Context, string, model.ApplicationUpdateInput) error); ok { 153 r0 = rf(ctx, id, in) 154 } else { 155 r0 = ret.Error(0) 156 } 157 158 return r0 159 } 160 161 // Upsert provides a mock function with given fields: ctx, in 162 func (_m *ApplicationService) Upsert(ctx context.Context, in model.ApplicationRegisterInput) error { 163 ret := _m.Called(ctx, in) 164 165 var r0 error 166 if rf, ok := ret.Get(0).(func(context.Context, model.ApplicationRegisterInput) error); ok { 167 r0 = rf(ctx, in) 168 } else { 169 r0 = ret.Error(0) 170 } 171 172 return r0 173 } 174 175 type mockConstructorTestingTNewApplicationService interface { 176 mock.TestingT 177 Cleanup(func()) 178 } 179 180 // NewApplicationService creates a new instance of ApplicationService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 181 func NewApplicationService(t mockConstructorTestingTNewApplicationService) *ApplicationService { 182 mock := &ApplicationService{} 183 mock.Mock.Test(t) 184 185 t.Cleanup(func() { mock.AssertExpectations(t) }) 186 187 return mock 188 }