github.com/enbility/spine-go@v0.7.0/mocks/SubscriptionManagerInterface.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 // SubscriptionManagerInterface is an autogenerated mock type for the SubscriptionManagerInterface type 13 type SubscriptionManagerInterface struct { 14 mock.Mock 15 } 16 17 type SubscriptionManagerInterface_Expecter struct { 18 mock *mock.Mock 19 } 20 21 func (_m *SubscriptionManagerInterface) EXPECT() *SubscriptionManagerInterface_Expecter { 22 return &SubscriptionManagerInterface_Expecter{mock: &_m.Mock} 23 } 24 25 // AddSubscription provides a mock function with given fields: remoteDevice, data 26 func (_m *SubscriptionManagerInterface) AddSubscription(remoteDevice api.DeviceRemoteInterface, data model.SubscriptionManagementRequestCallType) error { 27 ret := _m.Called(remoteDevice, data) 28 29 if len(ret) == 0 { 30 panic("no return value specified for AddSubscription") 31 } 32 33 var r0 error 34 if rf, ok := ret.Get(0).(func(api.DeviceRemoteInterface, model.SubscriptionManagementRequestCallType) error); ok { 35 r0 = rf(remoteDevice, data) 36 } else { 37 r0 = ret.Error(0) 38 } 39 40 return r0 41 } 42 43 // SubscriptionManagerInterface_AddSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSubscription' 44 type SubscriptionManagerInterface_AddSubscription_Call struct { 45 *mock.Call 46 } 47 48 // AddSubscription is a helper method to define mock.On call 49 // - remoteDevice api.DeviceRemoteInterface 50 // - data model.SubscriptionManagementRequestCallType 51 func (_e *SubscriptionManagerInterface_Expecter) AddSubscription(remoteDevice interface{}, data interface{}) *SubscriptionManagerInterface_AddSubscription_Call { 52 return &SubscriptionManagerInterface_AddSubscription_Call{Call: _e.mock.On("AddSubscription", remoteDevice, data)} 53 } 54 55 func (_c *SubscriptionManagerInterface_AddSubscription_Call) Run(run func(remoteDevice api.DeviceRemoteInterface, data model.SubscriptionManagementRequestCallType)) *SubscriptionManagerInterface_AddSubscription_Call { 56 _c.Call.Run(func(args mock.Arguments) { 57 run(args[0].(api.DeviceRemoteInterface), args[1].(model.SubscriptionManagementRequestCallType)) 58 }) 59 return _c 60 } 61 62 func (_c *SubscriptionManagerInterface_AddSubscription_Call) Return(_a0 error) *SubscriptionManagerInterface_AddSubscription_Call { 63 _c.Call.Return(_a0) 64 return _c 65 } 66 67 func (_c *SubscriptionManagerInterface_AddSubscription_Call) RunAndReturn(run func(api.DeviceRemoteInterface, model.SubscriptionManagementRequestCallType) error) *SubscriptionManagerInterface_AddSubscription_Call { 68 _c.Call.Return(run) 69 return _c 70 } 71 72 // RemoveSubscription provides a mock function with given fields: data, remoteDevice 73 func (_m *SubscriptionManagerInterface) RemoveSubscription(data model.SubscriptionManagementDeleteCallType, remoteDevice api.DeviceRemoteInterface) error { 74 ret := _m.Called(data, remoteDevice) 75 76 if len(ret) == 0 { 77 panic("no return value specified for RemoveSubscription") 78 } 79 80 var r0 error 81 if rf, ok := ret.Get(0).(func(model.SubscriptionManagementDeleteCallType, api.DeviceRemoteInterface) error); ok { 82 r0 = rf(data, remoteDevice) 83 } else { 84 r0 = ret.Error(0) 85 } 86 87 return r0 88 } 89 90 // SubscriptionManagerInterface_RemoveSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveSubscription' 91 type SubscriptionManagerInterface_RemoveSubscription_Call struct { 92 *mock.Call 93 } 94 95 // RemoveSubscription is a helper method to define mock.On call 96 // - data model.SubscriptionManagementDeleteCallType 97 // - remoteDevice api.DeviceRemoteInterface 98 func (_e *SubscriptionManagerInterface_Expecter) RemoveSubscription(data interface{}, remoteDevice interface{}) *SubscriptionManagerInterface_RemoveSubscription_Call { 99 return &SubscriptionManagerInterface_RemoveSubscription_Call{Call: _e.mock.On("RemoveSubscription", data, remoteDevice)} 100 } 101 102 func (_c *SubscriptionManagerInterface_RemoveSubscription_Call) Run(run func(data model.SubscriptionManagementDeleteCallType, remoteDevice api.DeviceRemoteInterface)) *SubscriptionManagerInterface_RemoveSubscription_Call { 103 _c.Call.Run(func(args mock.Arguments) { 104 run(args[0].(model.SubscriptionManagementDeleteCallType), args[1].(api.DeviceRemoteInterface)) 105 }) 106 return _c 107 } 108 109 func (_c *SubscriptionManagerInterface_RemoveSubscription_Call) Return(_a0 error) *SubscriptionManagerInterface_RemoveSubscription_Call { 110 _c.Call.Return(_a0) 111 return _c 112 } 113 114 func (_c *SubscriptionManagerInterface_RemoveSubscription_Call) RunAndReturn(run func(model.SubscriptionManagementDeleteCallType, api.DeviceRemoteInterface) error) *SubscriptionManagerInterface_RemoveSubscription_Call { 115 _c.Call.Return(run) 116 return _c 117 } 118 119 // RemoveSubscriptionsForDevice provides a mock function with given fields: remoteDevice 120 func (_m *SubscriptionManagerInterface) RemoveSubscriptionsForDevice(remoteDevice api.DeviceRemoteInterface) { 121 _m.Called(remoteDevice) 122 } 123 124 // SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveSubscriptionsForDevice' 125 type SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call struct { 126 *mock.Call 127 } 128 129 // RemoveSubscriptionsForDevice is a helper method to define mock.On call 130 // - remoteDevice api.DeviceRemoteInterface 131 func (_e *SubscriptionManagerInterface_Expecter) RemoveSubscriptionsForDevice(remoteDevice interface{}) *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call { 132 return &SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call{Call: _e.mock.On("RemoveSubscriptionsForDevice", remoteDevice)} 133 } 134 135 func (_c *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call) Run(run func(remoteDevice api.DeviceRemoteInterface)) *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call { 136 _c.Call.Run(func(args mock.Arguments) { 137 run(args[0].(api.DeviceRemoteInterface)) 138 }) 139 return _c 140 } 141 142 func (_c *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call) Return() *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call { 143 _c.Call.Return() 144 return _c 145 } 146 147 func (_c *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call) RunAndReturn(run func(api.DeviceRemoteInterface)) *SubscriptionManagerInterface_RemoveSubscriptionsForDevice_Call { 148 _c.Call.Return(run) 149 return _c 150 } 151 152 // RemoveSubscriptionsForEntity provides a mock function with given fields: remoteEntity 153 func (_m *SubscriptionManagerInterface) RemoveSubscriptionsForEntity(remoteEntity api.EntityRemoteInterface) { 154 _m.Called(remoteEntity) 155 } 156 157 // SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveSubscriptionsForEntity' 158 type SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call struct { 159 *mock.Call 160 } 161 162 // RemoveSubscriptionsForEntity is a helper method to define mock.On call 163 // - remoteEntity api.EntityRemoteInterface 164 func (_e *SubscriptionManagerInterface_Expecter) RemoveSubscriptionsForEntity(remoteEntity interface{}) *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call { 165 return &SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call{Call: _e.mock.On("RemoveSubscriptionsForEntity", remoteEntity)} 166 } 167 168 func (_c *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call) Run(run func(remoteEntity api.EntityRemoteInterface)) *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call { 169 _c.Call.Run(func(args mock.Arguments) { 170 run(args[0].(api.EntityRemoteInterface)) 171 }) 172 return _c 173 } 174 175 func (_c *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call) Return() *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call { 176 _c.Call.Return() 177 return _c 178 } 179 180 func (_c *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call) RunAndReturn(run func(api.EntityRemoteInterface)) *SubscriptionManagerInterface_RemoveSubscriptionsForEntity_Call { 181 _c.Call.Return(run) 182 return _c 183 } 184 185 // Subscriptions provides a mock function with given fields: remoteDevice 186 func (_m *SubscriptionManagerInterface) Subscriptions(remoteDevice api.DeviceRemoteInterface) []*api.SubscriptionEntry { 187 ret := _m.Called(remoteDevice) 188 189 if len(ret) == 0 { 190 panic("no return value specified for Subscriptions") 191 } 192 193 var r0 []*api.SubscriptionEntry 194 if rf, ok := ret.Get(0).(func(api.DeviceRemoteInterface) []*api.SubscriptionEntry); ok { 195 r0 = rf(remoteDevice) 196 } else { 197 if ret.Get(0) != nil { 198 r0 = ret.Get(0).([]*api.SubscriptionEntry) 199 } 200 } 201 202 return r0 203 } 204 205 // SubscriptionManagerInterface_Subscriptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscriptions' 206 type SubscriptionManagerInterface_Subscriptions_Call struct { 207 *mock.Call 208 } 209 210 // Subscriptions is a helper method to define mock.On call 211 // - remoteDevice api.DeviceRemoteInterface 212 func (_e *SubscriptionManagerInterface_Expecter) Subscriptions(remoteDevice interface{}) *SubscriptionManagerInterface_Subscriptions_Call { 213 return &SubscriptionManagerInterface_Subscriptions_Call{Call: _e.mock.On("Subscriptions", remoteDevice)} 214 } 215 216 func (_c *SubscriptionManagerInterface_Subscriptions_Call) Run(run func(remoteDevice api.DeviceRemoteInterface)) *SubscriptionManagerInterface_Subscriptions_Call { 217 _c.Call.Run(func(args mock.Arguments) { 218 run(args[0].(api.DeviceRemoteInterface)) 219 }) 220 return _c 221 } 222 223 func (_c *SubscriptionManagerInterface_Subscriptions_Call) Return(_a0 []*api.SubscriptionEntry) *SubscriptionManagerInterface_Subscriptions_Call { 224 _c.Call.Return(_a0) 225 return _c 226 } 227 228 func (_c *SubscriptionManagerInterface_Subscriptions_Call) RunAndReturn(run func(api.DeviceRemoteInterface) []*api.SubscriptionEntry) *SubscriptionManagerInterface_Subscriptions_Call { 229 _c.Call.Return(run) 230 return _c 231 } 232 233 // SubscriptionsOnFeature provides a mock function with given fields: featureAddress 234 func (_m *SubscriptionManagerInterface) SubscriptionsOnFeature(featureAddress model.FeatureAddressType) []*api.SubscriptionEntry { 235 ret := _m.Called(featureAddress) 236 237 if len(ret) == 0 { 238 panic("no return value specified for SubscriptionsOnFeature") 239 } 240 241 var r0 []*api.SubscriptionEntry 242 if rf, ok := ret.Get(0).(func(model.FeatureAddressType) []*api.SubscriptionEntry); ok { 243 r0 = rf(featureAddress) 244 } else { 245 if ret.Get(0) != nil { 246 r0 = ret.Get(0).([]*api.SubscriptionEntry) 247 } 248 } 249 250 return r0 251 } 252 253 // SubscriptionManagerInterface_SubscriptionsOnFeature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscriptionsOnFeature' 254 type SubscriptionManagerInterface_SubscriptionsOnFeature_Call struct { 255 *mock.Call 256 } 257 258 // SubscriptionsOnFeature is a helper method to define mock.On call 259 // - featureAddress model.FeatureAddressType 260 func (_e *SubscriptionManagerInterface_Expecter) SubscriptionsOnFeature(featureAddress interface{}) *SubscriptionManagerInterface_SubscriptionsOnFeature_Call { 261 return &SubscriptionManagerInterface_SubscriptionsOnFeature_Call{Call: _e.mock.On("SubscriptionsOnFeature", featureAddress)} 262 } 263 264 func (_c *SubscriptionManagerInterface_SubscriptionsOnFeature_Call) Run(run func(featureAddress model.FeatureAddressType)) *SubscriptionManagerInterface_SubscriptionsOnFeature_Call { 265 _c.Call.Run(func(args mock.Arguments) { 266 run(args[0].(model.FeatureAddressType)) 267 }) 268 return _c 269 } 270 271 func (_c *SubscriptionManagerInterface_SubscriptionsOnFeature_Call) Return(_a0 []*api.SubscriptionEntry) *SubscriptionManagerInterface_SubscriptionsOnFeature_Call { 272 _c.Call.Return(_a0) 273 return _c 274 } 275 276 func (_c *SubscriptionManagerInterface_SubscriptionsOnFeature_Call) RunAndReturn(run func(model.FeatureAddressType) []*api.SubscriptionEntry) *SubscriptionManagerInterface_SubscriptionsOnFeature_Call { 277 _c.Call.Return(run) 278 return _c 279 } 280 281 // NewSubscriptionManagerInterface creates a new instance of SubscriptionManagerInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 282 // The first argument is typically a *testing.T value. 283 func NewSubscriptionManagerInterface(t interface { 284 mock.TestingT 285 Cleanup(func()) 286 }) *SubscriptionManagerInterface { 287 mock := &SubscriptionManagerInterface{} 288 mock.Mock.Test(t) 289 290 t.Cleanup(func() { mock.AssertExpectations(t) }) 291 292 return mock 293 }