| /* |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * https://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| |
| // Code generated by mockery v2.42.2. DO NOT EDIT. |
| |
| package bacnetip |
| |
| import ( |
| model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // MockTag is an autogenerated mock type for the Tag type |
| type MockTag struct { |
| mock.Mock |
| } |
| |
| type MockTag_Expecter struct { |
| mock *mock.Mock |
| } |
| |
| func (_m *MockTag) EXPECT() *MockTag_Expecter { |
| return &MockTag_Expecter{mock: &_m.Mock} |
| } |
| |
| // AppToContext provides a mock function with given fields: context |
| func (_m *MockTag) AppToContext(context uint) (*ContextTag, error) { |
| ret := _m.Called(context) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for AppToContext") |
| } |
| |
| var r0 *ContextTag |
| var r1 error |
| if rf, ok := ret.Get(0).(func(uint) (*ContextTag, error)); ok { |
| return rf(context) |
| } |
| if rf, ok := ret.Get(0).(func(uint) *ContextTag); ok { |
| r0 = rf(context) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*ContextTag) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(uint) error); ok { |
| r1 = rf(context) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // MockTag_AppToContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppToContext' |
| type MockTag_AppToContext_Call struct { |
| *mock.Call |
| } |
| |
| // AppToContext is a helper method to define mock.On call |
| // - context uint |
| func (_e *MockTag_Expecter) AppToContext(context interface{}) *MockTag_AppToContext_Call { |
| return &MockTag_AppToContext_Call{Call: _e.mock.On("AppToContext", context)} |
| } |
| |
| func (_c *MockTag_AppToContext_Call) Run(run func(context uint)) *MockTag_AppToContext_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(uint)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_AppToContext_Call) Return(_a0 *ContextTag, _a1 error) *MockTag_AppToContext_Call { |
| _c.Call.Return(_a0, _a1) |
| return _c |
| } |
| |
| func (_c *MockTag_AppToContext_Call) RunAndReturn(run func(uint) (*ContextTag, error)) *MockTag_AppToContext_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // AppToObject provides a mock function with given fields: |
| func (_m *MockTag) AppToObject() (interface{}, error) { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for AppToObject") |
| } |
| |
| var r0 interface{} |
| var r1 error |
| if rf, ok := ret.Get(0).(func() (interface{}, error)); ok { |
| return rf() |
| } |
| if rf, ok := ret.Get(0).(func() interface{}); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(interface{}) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func() error); ok { |
| r1 = rf() |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // MockTag_AppToObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppToObject' |
| type MockTag_AppToObject_Call struct { |
| *mock.Call |
| } |
| |
| // AppToObject is a helper method to define mock.On call |
| func (_e *MockTag_Expecter) AppToObject() *MockTag_AppToObject_Call { |
| return &MockTag_AppToObject_Call{Call: _e.mock.On("AppToObject")} |
| } |
| |
| func (_c *MockTag_AppToObject_Call) Run(run func()) *MockTag_AppToObject_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_AppToObject_Call) Return(_a0 interface{}, _a1 error) *MockTag_AppToObject_Call { |
| _c.Call.Return(_a0, _a1) |
| return _c |
| } |
| |
| func (_c *MockTag_AppToObject_Call) RunAndReturn(run func() (interface{}, error)) *MockTag_AppToObject_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // Decode provides a mock function with given fields: pdu |
| func (_m *MockTag) Decode(pdu PDUData) error { |
| ret := _m.Called(pdu) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Decode") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(PDUData) error); ok { |
| r0 = rf(pdu) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // MockTag_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' |
| type MockTag_Decode_Call struct { |
| *mock.Call |
| } |
| |
| // Decode is a helper method to define mock.On call |
| // - pdu PDUData |
| func (_e *MockTag_Expecter) Decode(pdu interface{}) *MockTag_Decode_Call { |
| return &MockTag_Decode_Call{Call: _e.mock.On("Decode", pdu)} |
| } |
| |
| func (_c *MockTag_Decode_Call) Run(run func(pdu PDUData)) *MockTag_Decode_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(PDUData)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_Decode_Call) Return(_a0 error) *MockTag_Decode_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockTag_Decode_Call) RunAndReturn(run func(PDUData) error) *MockTag_Decode_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // Encode provides a mock function with given fields: pdu |
| func (_m *MockTag) Encode(pdu PDUData) { |
| _m.Called(pdu) |
| } |
| |
| // MockTag_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' |
| type MockTag_Encode_Call struct { |
| *mock.Call |
| } |
| |
| // Encode is a helper method to define mock.On call |
| // - pdu PDUData |
| func (_e *MockTag_Expecter) Encode(pdu interface{}) *MockTag_Encode_Call { |
| return &MockTag_Encode_Call{Call: _e.mock.On("Encode", pdu)} |
| } |
| |
| func (_c *MockTag_Encode_Call) Run(run func(pdu PDUData)) *MockTag_Encode_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(PDUData)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_Encode_Call) Return() *MockTag_Encode_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockTag_Encode_Call) RunAndReturn(run func(PDUData)) *MockTag_Encode_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetTagClass provides a mock function with given fields: |
| func (_m *MockTag) GetTagClass() model.TagClass { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetTagClass") |
| } |
| |
| var r0 model.TagClass |
| if rf, ok := ret.Get(0).(func() model.TagClass); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Get(0).(model.TagClass) |
| } |
| |
| return r0 |
| } |
| |
| // MockTag_GetTagClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagClass' |
| type MockTag_GetTagClass_Call struct { |
| *mock.Call |
| } |
| |
| // GetTagClass is a helper method to define mock.On call |
| func (_e *MockTag_Expecter) GetTagClass() *MockTag_GetTagClass_Call { |
| return &MockTag_GetTagClass_Call{Call: _e.mock.On("GetTagClass")} |
| } |
| |
| func (_c *MockTag_GetTagClass_Call) Run(run func()) *MockTag_GetTagClass_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagClass_Call) Return(_a0 model.TagClass) *MockTag_GetTagClass_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagClass_Call) RunAndReturn(run func() model.TagClass) *MockTag_GetTagClass_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetTagData provides a mock function with given fields: |
| func (_m *MockTag) GetTagData() []byte { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetTagData") |
| } |
| |
| var r0 []byte |
| if rf, ok := ret.Get(0).(func() []byte); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]byte) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // MockTag_GetTagData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagData' |
| type MockTag_GetTagData_Call struct { |
| *mock.Call |
| } |
| |
| // GetTagData is a helper method to define mock.On call |
| func (_e *MockTag_Expecter) GetTagData() *MockTag_GetTagData_Call { |
| return &MockTag_GetTagData_Call{Call: _e.mock.On("GetTagData")} |
| } |
| |
| func (_c *MockTag_GetTagData_Call) Run(run func()) *MockTag_GetTagData_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagData_Call) Return(_a0 []byte) *MockTag_GetTagData_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagData_Call) RunAndReturn(run func() []byte) *MockTag_GetTagData_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetTagLvt provides a mock function with given fields: |
| func (_m *MockTag) GetTagLvt() int { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetTagLvt") |
| } |
| |
| var r0 int |
| if rf, ok := ret.Get(0).(func() int); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Get(0).(int) |
| } |
| |
| return r0 |
| } |
| |
| // MockTag_GetTagLvt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagLvt' |
| type MockTag_GetTagLvt_Call struct { |
| *mock.Call |
| } |
| |
| // GetTagLvt is a helper method to define mock.On call |
| func (_e *MockTag_Expecter) GetTagLvt() *MockTag_GetTagLvt_Call { |
| return &MockTag_GetTagLvt_Call{Call: _e.mock.On("GetTagLvt")} |
| } |
| |
| func (_c *MockTag_GetTagLvt_Call) Run(run func()) *MockTag_GetTagLvt_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagLvt_Call) Return(_a0 int) *MockTag_GetTagLvt_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagLvt_Call) RunAndReturn(run func() int) *MockTag_GetTagLvt_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetTagNumber provides a mock function with given fields: |
| func (_m *MockTag) GetTagNumber() uint { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetTagNumber") |
| } |
| |
| var r0 uint |
| if rf, ok := ret.Get(0).(func() uint); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Get(0).(uint) |
| } |
| |
| return r0 |
| } |
| |
| // MockTag_GetTagNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagNumber' |
| type MockTag_GetTagNumber_Call struct { |
| *mock.Call |
| } |
| |
| // GetTagNumber is a helper method to define mock.On call |
| func (_e *MockTag_Expecter) GetTagNumber() *MockTag_GetTagNumber_Call { |
| return &MockTag_GetTagNumber_Call{Call: _e.mock.On("GetTagNumber")} |
| } |
| |
| func (_c *MockTag_GetTagNumber_Call) Run(run func()) *MockTag_GetTagNumber_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagNumber_Call) Return(_a0 uint) *MockTag_GetTagNumber_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockTag_GetTagNumber_Call) RunAndReturn(run func() uint) *MockTag_GetTagNumber_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // set provides a mock function with given fields: args |
| func (_m *MockTag) set(args Args) { |
| _m.Called(args) |
| } |
| |
| // MockTag_set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'set' |
| type MockTag_set_Call struct { |
| *mock.Call |
| } |
| |
| // set is a helper method to define mock.On call |
| // - args Args |
| func (_e *MockTag_Expecter) set(args interface{}) *MockTag_set_Call { |
| return &MockTag_set_Call{Call: _e.mock.On("set", args)} |
| } |
| |
| func (_c *MockTag_set_Call) Run(run func(args Args)) *MockTag_set_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(Args)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_set_Call) Return() *MockTag_set_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockTag_set_Call) RunAndReturn(run func(Args)) *MockTag_set_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // setAppData provides a mock function with given fields: tagNumber, tdata |
| func (_m *MockTag) setAppData(tagNumber uint, tdata []byte) { |
| _m.Called(tagNumber, tdata) |
| } |
| |
| // MockTag_setAppData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAppData' |
| type MockTag_setAppData_Call struct { |
| *mock.Call |
| } |
| |
| // setAppData is a helper method to define mock.On call |
| // - tagNumber uint |
| // - tdata []byte |
| func (_e *MockTag_Expecter) setAppData(tagNumber interface{}, tdata interface{}) *MockTag_setAppData_Call { |
| return &MockTag_setAppData_Call{Call: _e.mock.On("setAppData", tagNumber, tdata)} |
| } |
| |
| func (_c *MockTag_setAppData_Call) Run(run func(tagNumber uint, tdata []byte)) *MockTag_setAppData_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(uint), args[1].([]byte)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockTag_setAppData_Call) Return() *MockTag_setAppData_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockTag_setAppData_Call) RunAndReturn(run func(uint, []byte)) *MockTag_setAppData_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // NewMockTag creates a new instance of MockTag. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| // The first argument is typically a *testing.T value. |
| func NewMockTag(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *MockTag { |
| mock := &MockTag{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |