github.com/enbility/spine-go@v0.7.0/mocks/BindingManagerInterface.go (about) 1 // Code generated by mockery v2.45.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 api "github.com/enbility/spine-go/api" 7 mock "github.com/stretchr/testify/mock" 8 9 model "github.com/enbility/spine-go/model" 10 ) 11 12 // BindingManagerInterface is an autogenerated mock type for the BindingManagerInterface type 13 type BindingManagerInterface struct { 14 mock.Mock 15 } 16 17 type BindingManagerInterface_Expecter struct { 18 mock *mock.Mock 19 } 20 21 func (_m *BindingManagerInterface) EXPECT() *BindingManagerInterface_Expecter { 22 return &BindingManagerInterface_Expecter{mock: &_m.Mock} 23 } 24 25 // AddBinding provides a mock function with given fields: remoteDevice, data 26 func (_m *BindingManagerInterface) AddBinding(remoteDevice api.DeviceRemoteInterface, data model.BindingManagementRequestCallType) error { 27 ret := _m.Called(remoteDevice, data) 28 29 if len(ret) == 0 { 30 panic("no return value specified for AddBinding") 31 } 32 33 var r0 error 34 if rf, ok := ret.Get(0).(func(api.DeviceRemoteInterface, model.BindingManagementRequestCallType) error); ok { 35 r0 = rf(remoteDevice, data) 36 } else { 37 r0 = ret.Error(0) 38 } 39 40 return r0 41 } 42 43 // BindingManagerInterface_AddBinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBinding' 44 type BindingManagerInterface_AddBinding_Call struct { 45 *mock.Call 46 } 47 48 // AddBinding is a helper method to define mock.On call 49 // - remoteDevice api.DeviceRemoteInterface 50 // - data model.BindingManagementRequestCallType 51 func (_e *BindingManagerInterface_Expecter) AddBinding(remoteDevice interface{}, data interface{}) *BindingManagerInterface_AddBinding_Call { 52 return &BindingManagerInterface_AddBinding_Call{Call: _e.mock.On("AddBinding", remoteDevice, data)} 53 } 54 55 func (_c *BindingManagerInterface_AddBinding_Call) Run(run func(remoteDevice api.DeviceRemoteInterface, data model.BindingManagementRequestCallType)) *BindingManagerInterface_AddBinding_Call { 56 _c.Call.Run(func(args mock.Arguments) { 57 run(args[0].(api.DeviceRemoteInterface), args[1].(model.BindingManagementRequestCallType)) 58 }) 59 return _c 60 } 61 62 func (_c *BindingManagerInterface_AddBinding_Call) Return(_a0 error) *BindingManagerInterface_AddBinding_Call { 63 _c.Call.Return(_a0) 64 return _c 65 } 66 67 func (_c *BindingManagerInterface_AddBinding_Call) RunAndReturn(run func(api.DeviceRemoteInterface, model.BindingManagementRequestCallType) error) *BindingManagerInterface_AddBinding_Call { 68 _c.Call.Return(run) 69 return _c 70 } 71 72 // Bindings provides a mock function with given fields: remoteDevice 73 func (_m *BindingManagerInterface) Bindings(remoteDevice api.DeviceRemoteInterface) []*api.BindingEntry { 74 ret := _m.Called(remoteDevice) 75 76 if len(ret) == 0 { 77 panic("no return value specified for Bindings") 78 } 79 80 var r0 []*api.BindingEntry 81 if rf, ok := ret.Get(0).(func(api.DeviceRemoteInterface) []*api.BindingEntry); ok { 82 r0 = rf(remoteDevice) 83 } else { 84 if ret.Get(0) != nil { 85 r0 = ret.Get(0).([]*api.BindingEntry) 86 } 87 } 88 89 return r0 90 } 91 92 // BindingManagerInterface_Bindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bindings' 93 type BindingManagerInterface_Bindings_Call struct { 94 *mock.Call 95 } 96 97 // Bindings is a helper method to define mock.On call 98 // - remoteDevice api.DeviceRemoteInterface 99 func (_e *BindingManagerInterface_Expecter) Bindings(remoteDevice interface{}) *BindingManagerInterface_Bindings_Call { 100 return &BindingManagerInterface_Bindings_Call{Call: _e.mock.On("Bindings", remoteDevice)} 101 } 102 103 func (_c *BindingManagerInterface_Bindings_Call) Run(run func(remoteDevice api.DeviceRemoteInterface)) *BindingManagerInterface_Bindings_Call { 104 _c.Call.Run(func(args mock.Arguments) { 105 run(args[0].(api.DeviceRemoteInterface)) 106 }) 107 return _c 108 } 109 110 func (_c *BindingManagerInterface_Bindings_Call) Return(_a0 []*api.BindingEntry) *BindingManagerInterface_Bindings_Call { 111 _c.Call.Return(_a0) 112 return _c 113 } 114 115 func (_c *BindingManagerInterface_Bindings_Call) RunAndReturn(run func(api.DeviceRemoteInterface) []*api.BindingEntry) *BindingManagerInterface_Bindings_Call { 116 _c.Call.Return(run) 117 return _c 118 } 119 120 // BindingsOnFeature provides a mock function with given fields: featureAddress 121 func (_m *BindingManagerInterface) BindingsOnFeature(featureAddress model.FeatureAddressType) []*api.BindingEntry { 122 ret := _m.Called(featureAddress) 123 124 if len(ret) == 0 { 125 panic("no return value specified for BindingsOnFeature") 126 } 127 128 var r0 []*api.BindingEntry 129 if rf, ok := ret.Get(0).(func(model.FeatureAddressType) []*api.BindingEntry); ok { 130 r0 = rf(featureAddress) 131 } else { 132 if ret.Get(0) != nil { 133 r0 = ret.Get(0).([]*api.BindingEntry) 134 } 135 } 136 137 return r0 138 } 139 140 // BindingManagerInterface_BindingsOnFeature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BindingsOnFeature' 141 type BindingManagerInterface_BindingsOnFeature_Call struct { 142 *mock.Call 143 } 144 145 // BindingsOnFeature is a helper method to define mock.On call 146 // - featureAddress model.FeatureAddressType 147 func (_e *BindingManagerInterface_Expecter) BindingsOnFeature(featureAddress interface{}) *BindingManagerInterface_BindingsOnFeature_Call { 148 return &BindingManagerInterface_BindingsOnFeature_Call{Call: _e.mock.On("BindingsOnFeature", featureAddress)} 149 } 150 151 func (_c *BindingManagerInterface_BindingsOnFeature_Call) Run(run func(featureAddress model.FeatureAddressType)) *BindingManagerInterface_BindingsOnFeature_Call { 152 _c.Call.Run(func(args mock.Arguments) { 153 run(args[0].(model.FeatureAddressType)) 154 }) 155 return _c 156 } 157 158 func (_c *BindingManagerInterface_BindingsOnFeature_Call) Return(_a0 []*api.BindingEntry) *BindingManagerInterface_BindingsOnFeature_Call { 159 _c.Call.Return(_a0) 160 return _c 161 } 162 163 func (_c *BindingManagerInterface_BindingsOnFeature_Call) RunAndReturn(run func(model.FeatureAddressType) []*api.BindingEntry) *BindingManagerInterface_BindingsOnFeature_Call { 164 _c.Call.Return(run) 165 return _c 166 } 167 168 // HasLocalFeatureRemoteBinding provides a mock function with given fields: localAddress, remoteAddress 169 func (_m *BindingManagerInterface) HasLocalFeatureRemoteBinding(localAddress *model.FeatureAddressType, remoteAddress *model.FeatureAddressType) bool { 170 ret := _m.Called(localAddress, remoteAddress) 171 172 if len(ret) == 0 { 173 panic("no return value specified for HasLocalFeatureRemoteBinding") 174 } 175 176 var r0 bool 177 if rf, ok := ret.Get(0).(func(*model.FeatureAddressType, *model.FeatureAddressType) bool); ok { 178 r0 = rf(localAddress, remoteAddress) 179 } else { 180 r0 = ret.Get(0).(bool) 181 } 182 183 return r0 184 } 185 186 // BindingManagerInterface_HasLocalFeatureRemoteBinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasLocalFeatureRemoteBinding' 187 type BindingManagerInterface_HasLocalFeatureRemoteBinding_Call struct { 188 *mock.Call 189 } 190 191 // HasLocalFeatureRemoteBinding is a helper method to define mock.On call 192 // - localAddress *model.FeatureAddressType 193 // - remoteAddress *model.FeatureAddressType 194 func (_e *BindingManagerInterface_Expecter) HasLocalFeatureRemoteBinding(localAddress interface{}, remoteAddress interface{}) *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call { 195 return &BindingManagerInterface_HasLocalFeatureRemoteBinding_Call{Call: _e.mock.On("HasLocalFeatureRemoteBinding", localAddress, remoteAddress)} 196 } 197 198 func (_c *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call) Run(run func(localAddress *model.FeatureAddressType, remoteAddress *model.FeatureAddressType)) *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call { 199 _c.Call.Run(func(args mock.Arguments) { 200 run(args[0].(*model.FeatureAddressType), args[1].(*model.FeatureAddressType)) 201 }) 202 return _c 203 } 204 205 func (_c *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call) Return(_a0 bool) *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call { 206 _c.Call.Return(_a0) 207 return _c 208 } 209 210 func (_c *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call) RunAndReturn(run func(*model.FeatureAddressType, *model.FeatureAddressType) bool) *BindingManagerInterface_HasLocalFeatureRemoteBinding_Call { 211 _c.Call.Return(run) 212 return _c 213 } 214 215 // RemoveBinding provides a mock function with given fields: data, remoteDevice 216 func (_m *BindingManagerInterface) RemoveBinding(data model.BindingManagementDeleteCallType, remoteDevice api.DeviceRemoteInterface) error { 217 ret := _m.Called(data, remoteDevice) 218 219 if len(ret) == 0 { 220 panic("no return value specified for RemoveBinding") 221 } 222 223 var r0 error 224 if rf, ok := ret.Get(0).(func(model.BindingManagementDeleteCallType, api.DeviceRemoteInterface) error); ok { 225 r0 = rf(data, remoteDevice) 226 } else { 227 r0 = ret.Error(0) 228 } 229 230 return r0 231 } 232 233 // BindingManagerInterface_RemoveBinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveBinding' 234 type BindingManagerInterface_RemoveBinding_Call struct { 235 *mock.Call 236 } 237 238 // RemoveBinding is a helper method to define mock.On call 239 // - data model.BindingManagementDeleteCallType 240 // - remoteDevice api.DeviceRemoteInterface 241 func (_e *BindingManagerInterface_Expecter) RemoveBinding(data interface{}, remoteDevice interface{}) *BindingManagerInterface_RemoveBinding_Call { 242 return &BindingManagerInterface_RemoveBinding_Call{Call: _e.mock.On("RemoveBinding", data, remoteDevice)} 243 } 244 245 func (_c *BindingManagerInterface_RemoveBinding_Call) Run(run func(data model.BindingManagementDeleteCallType, remoteDevice api.DeviceRemoteInterface)) *BindingManagerInterface_RemoveBinding_Call { 246 _c.Call.Run(func(args mock.Arguments) { 247 run(args[0].(model.BindingManagementDeleteCallType), args[1].(api.DeviceRemoteInterface)) 248 }) 249 return _c 250 } 251 252 func (_c *BindingManagerInterface_RemoveBinding_Call) Return(_a0 error) *BindingManagerInterface_RemoveBinding_Call { 253 _c.Call.Return(_a0) 254 return _c 255 } 256 257 func (_c *BindingManagerInterface_RemoveBinding_Call) RunAndReturn(run func(model.BindingManagementDeleteCallType, api.DeviceRemoteInterface) error) *BindingManagerInterface_RemoveBinding_Call { 258 _c.Call.Return(run) 259 return _c 260 } 261 262 // RemoveBindingsForDevice provides a mock function with given fields: remoteDevice 263 func (_m *BindingManagerInterface) RemoveBindingsForDevice(remoteDevice api.DeviceRemoteInterface) { 264 _m.Called(remoteDevice) 265 } 266 267 // BindingManagerInterface_RemoveBindingsForDevice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveBindingsForDevice' 268 type BindingManagerInterface_RemoveBindingsForDevice_Call struct { 269 *mock.Call 270 } 271 272 // RemoveBindingsForDevice is a helper method to define mock.On call 273 // - remoteDevice api.DeviceRemoteInterface 274 func (_e *BindingManagerInterface_Expecter) RemoveBindingsForDevice(remoteDevice interface{}) *BindingManagerInterface_RemoveBindingsForDevice_Call { 275 return &BindingManagerInterface_RemoveBindingsForDevice_Call{Call: _e.mock.On("RemoveBindingsForDevice", remoteDevice)} 276 } 277 278 func (_c *BindingManagerInterface_RemoveBindingsForDevice_Call) Run(run func(remoteDevice api.DeviceRemoteInterface)) *BindingManagerInterface_RemoveBindingsForDevice_Call { 279 _c.Call.Run(func(args mock.Arguments) { 280 run(args[0].(api.DeviceRemoteInterface)) 281 }) 282 return _c 283 } 284 285 func (_c *BindingManagerInterface_RemoveBindingsForDevice_Call) Return() *BindingManagerInterface_RemoveBindingsForDevice_Call { 286 _c.Call.Return() 287 return _c 288 } 289 290 func (_c *BindingManagerInterface_RemoveBindingsForDevice_Call) RunAndReturn(run func(api.DeviceRemoteInterface)) *BindingManagerInterface_RemoveBindingsForDevice_Call { 291 _c.Call.Return(run) 292 return _c 293 } 294 295 // RemoveBindingsForEntity provides a mock function with given fields: remoteEntity 296 func (_m *BindingManagerInterface) RemoveBindingsForEntity(remoteEntity api.EntityRemoteInterface) { 297 _m.Called(remoteEntity) 298 } 299 300 // BindingManagerInterface_RemoveBindingsForEntity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveBindingsForEntity' 301 type BindingManagerInterface_RemoveBindingsForEntity_Call struct { 302 *mock.Call 303 } 304 305 // RemoveBindingsForEntity is a helper method to define mock.On call 306 // - remoteEntity api.EntityRemoteInterface 307 func (_e *BindingManagerInterface_Expecter) RemoveBindingsForEntity(remoteEntity interface{}) *BindingManagerInterface_RemoveBindingsForEntity_Call { 308 return &BindingManagerInterface_RemoveBindingsForEntity_Call{Call: _e.mock.On("RemoveBindingsForEntity", remoteEntity)} 309 } 310 311 func (_c *BindingManagerInterface_RemoveBindingsForEntity_Call) Run(run func(remoteEntity api.EntityRemoteInterface)) *BindingManagerInterface_RemoveBindingsForEntity_Call { 312 _c.Call.Run(func(args mock.Arguments) { 313 run(args[0].(api.EntityRemoteInterface)) 314 }) 315 return _c 316 } 317 318 func (_c *BindingManagerInterface_RemoveBindingsForEntity_Call) Return() *BindingManagerInterface_RemoveBindingsForEntity_Call { 319 _c.Call.Return() 320 return _c 321 } 322 323 func (_c *BindingManagerInterface_RemoveBindingsForEntity_Call) RunAndReturn(run func(api.EntityRemoteInterface)) *BindingManagerInterface_RemoveBindingsForEntity_Call { 324 _c.Call.Return(run) 325 return _c 326 } 327 328 // NewBindingManagerInterface creates a new instance of BindingManagerInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 329 // The first argument is typically a *testing.T value. 330 func NewBindingManagerInterface(t interface { 331 mock.TestingT 332 Cleanup(func()) 333 }) *BindingManagerInterface { 334 mock := &BindingManagerInterface{} 335 mock.Mock.Test(t) 336 337 t.Cleanup(func() { mock.AssertExpectations(t) }) 338 339 return mock 340 }