| /* |
| * 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" |
| spi "github.com/apache/plc4x/plc4go/spi" |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // MockNPCI is an autogenerated mock type for the NPCI type |
| type MockNPCI struct { |
| mock.Mock |
| } |
| |
| type MockNPCI_Expecter struct { |
| mock *mock.Mock |
| } |
| |
| func (_m *MockNPCI) EXPECT() *MockNPCI_Expecter { |
| return &MockNPCI_Expecter{mock: &_m.Mock} |
| } |
| |
| // Decode provides a mock function with given fields: pdu |
| func (_m *MockNPCI) Decode(pdu Arg) 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(Arg) error); ok { |
| r0 = rf(pdu) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' |
| type MockNPCI_Decode_Call struct { |
| *mock.Call |
| } |
| |
| // Decode is a helper method to define mock.On call |
| // - pdu Arg |
| func (_e *MockNPCI_Expecter) Decode(pdu interface{}) *MockNPCI_Decode_Call { |
| return &MockNPCI_Decode_Call{Call: _e.mock.On("Decode", pdu)} |
| } |
| |
| func (_c *MockNPCI_Decode_Call) Run(run func(pdu Arg)) *MockNPCI_Decode_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(Arg)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_Decode_Call) Return(_a0 error) *MockNPCI_Decode_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_Decode_Call) RunAndReturn(run func(Arg) error) *MockNPCI_Decode_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // Encode provides a mock function with given fields: pdu |
| func (_m *MockNPCI) Encode(pdu Arg) error { |
| ret := _m.Called(pdu) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Encode") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(Arg) error); ok { |
| r0 = rf(pdu) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' |
| type MockNPCI_Encode_Call struct { |
| *mock.Call |
| } |
| |
| // Encode is a helper method to define mock.On call |
| // - pdu Arg |
| func (_e *MockNPCI_Expecter) Encode(pdu interface{}) *MockNPCI_Encode_Call { |
| return &MockNPCI_Encode_Call{Call: _e.mock.On("Encode", pdu)} |
| } |
| |
| func (_c *MockNPCI_Encode_Call) Run(run func(pdu Arg)) *MockNPCI_Encode_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(Arg)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_Encode_Call) Return(_a0 error) *MockNPCI_Encode_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_Encode_Call) RunAndReturn(run func(Arg) error) *MockNPCI_Encode_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetExpectingReply provides a mock function with given fields: |
| func (_m *MockNPCI) GetExpectingReply() bool { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetExpectingReply") |
| } |
| |
| var r0 bool |
| if rf, ok := ret.Get(0).(func() bool); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' |
| type MockNPCI_GetExpectingReply_Call struct { |
| *mock.Call |
| } |
| |
| // GetExpectingReply is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) GetExpectingReply() *MockNPCI_GetExpectingReply_Call { |
| return &MockNPCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} |
| } |
| |
| func (_c *MockNPCI_GetExpectingReply_Call) Run(run func()) *MockNPCI_GetExpectingReply_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetExpectingReply_Call) Return(_a0 bool) *MockNPCI_GetExpectingReply_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockNPCI_GetExpectingReply_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetNPDUNetMessage provides a mock function with given fields: |
| func (_m *MockNPCI) GetNPDUNetMessage() *uint8 { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetNPDUNetMessage") |
| } |
| |
| var r0 *uint8 |
| if rf, ok := ret.Get(0).(func() *uint8); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*uint8) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_GetNPDUNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNPDUNetMessage' |
| type MockNPCI_GetNPDUNetMessage_Call struct { |
| *mock.Call |
| } |
| |
| // GetNPDUNetMessage is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) GetNPDUNetMessage() *MockNPCI_GetNPDUNetMessage_Call { |
| return &MockNPCI_GetNPDUNetMessage_Call{Call: _e.mock.On("GetNPDUNetMessage")} |
| } |
| |
| func (_c *MockNPCI_GetNPDUNetMessage_Call) Run(run func()) *MockNPCI_GetNPDUNetMessage_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetNPDUNetMessage_Call) Return(_a0 *uint8) *MockNPCI_GetNPDUNetMessage_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetNPDUNetMessage_Call) RunAndReturn(run func() *uint8) *MockNPCI_GetNPDUNetMessage_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetNetworkPriority provides a mock function with given fields: |
| func (_m *MockNPCI) GetNetworkPriority() model.NPDUNetworkPriority { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetNetworkPriority") |
| } |
| |
| var r0 model.NPDUNetworkPriority |
| if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Get(0).(model.NPDUNetworkPriority) |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' |
| type MockNPCI_GetNetworkPriority_Call struct { |
| *mock.Call |
| } |
| |
| // GetNetworkPriority is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) GetNetworkPriority() *MockNPCI_GetNetworkPriority_Call { |
| return &MockNPCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} |
| } |
| |
| func (_c *MockNPCI_GetNetworkPriority_Call) Run(run func()) *MockNPCI_GetNetworkPriority_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockNPCI_GetNetworkPriority_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockNPCI_GetNetworkPriority_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetPDUDestination provides a mock function with given fields: |
| func (_m *MockNPCI) GetPDUDestination() *Address { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetPDUDestination") |
| } |
| |
| var r0 *Address |
| if rf, ok := ret.Get(0).(func() *Address); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*Address) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' |
| type MockNPCI_GetPDUDestination_Call struct { |
| *mock.Call |
| } |
| |
| // GetPDUDestination is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) GetPDUDestination() *MockNPCI_GetPDUDestination_Call { |
| return &MockNPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} |
| } |
| |
| func (_c *MockNPCI_GetPDUDestination_Call) Run(run func()) *MockNPCI_GetPDUDestination_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockNPCI_GetPDUDestination_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockNPCI_GetPDUDestination_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetPDUSource provides a mock function with given fields: |
| func (_m *MockNPCI) GetPDUSource() *Address { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetPDUSource") |
| } |
| |
| var r0 *Address |
| if rf, ok := ret.Get(0).(func() *Address); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*Address) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' |
| type MockNPCI_GetPDUSource_Call struct { |
| *mock.Call |
| } |
| |
| // GetPDUSource is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) GetPDUSource() *MockNPCI_GetPDUSource_Call { |
| return &MockNPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} |
| } |
| |
| func (_c *MockNPCI_GetPDUSource_Call) Run(run func()) *MockNPCI_GetPDUSource_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetPDUSource_Call) Return(_a0 *Address) *MockNPCI_GetPDUSource_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockNPCI_GetPDUSource_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // GetPDUUserData provides a mock function with given fields: |
| func (_m *MockNPCI) GetPDUUserData() spi.Message { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetPDUUserData") |
| } |
| |
| var r0 spi.Message |
| if rf, ok := ret.Get(0).(func() spi.Message); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(spi.Message) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' |
| type MockNPCI_GetPDUUserData_Call struct { |
| *mock.Call |
| } |
| |
| // GetPDUUserData is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) GetPDUUserData() *MockNPCI_GetPDUUserData_Call { |
| return &MockNPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} |
| } |
| |
| func (_c *MockNPCI_GetPDUUserData_Call) Run(run func()) *MockNPCI_GetPDUUserData_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockNPCI_GetPDUUserData_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockNPCI_GetPDUUserData_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // SetPDUDestination provides a mock function with given fields: _a0 |
| func (_m *MockNPCI) SetPDUDestination(_a0 *Address) { |
| _m.Called(_a0) |
| } |
| |
| // MockNPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' |
| type MockNPCI_SetPDUDestination_Call struct { |
| *mock.Call |
| } |
| |
| // SetPDUDestination is a helper method to define mock.On call |
| // - _a0 *Address |
| func (_e *MockNPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockNPCI_SetPDUDestination_Call { |
| return &MockNPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} |
| } |
| |
| func (_c *MockNPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockNPCI_SetPDUDestination_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(*Address)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_SetPDUDestination_Call) Return() *MockNPCI_SetPDUDestination_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockNPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockNPCI_SetPDUDestination_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // SetPDUSource provides a mock function with given fields: source |
| func (_m *MockNPCI) SetPDUSource(source *Address) { |
| _m.Called(source) |
| } |
| |
| // MockNPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' |
| type MockNPCI_SetPDUSource_Call struct { |
| *mock.Call |
| } |
| |
| // SetPDUSource is a helper method to define mock.On call |
| // - source *Address |
| func (_e *MockNPCI_Expecter) SetPDUSource(source interface{}) *MockNPCI_SetPDUSource_Call { |
| return &MockNPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} |
| } |
| |
| func (_c *MockNPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockNPCI_SetPDUSource_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(*Address)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_SetPDUSource_Call) Return() *MockNPCI_SetPDUSource_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockNPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockNPCI_SetPDUSource_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // SetPDUUserData provides a mock function with given fields: _a0 |
| func (_m *MockNPCI) SetPDUUserData(_a0 spi.Message) { |
| _m.Called(_a0) |
| } |
| |
| // MockNPCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' |
| type MockNPCI_SetPDUUserData_Call struct { |
| *mock.Call |
| } |
| |
| // SetPDUUserData is a helper method to define mock.On call |
| // - _a0 spi.Message |
| func (_e *MockNPCI_Expecter) SetPDUUserData(_a0 interface{}) *MockNPCI_SetPDUUserData_Call { |
| return &MockNPCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} |
| } |
| |
| func (_c *MockNPCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockNPCI_SetPDUUserData_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(spi.Message)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_SetPDUUserData_Call) Return() *MockNPCI_SetPDUUserData_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockNPCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockNPCI_SetPDUUserData_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // String provides a mock function with given fields: |
| func (_m *MockNPCI) String() string { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for String") |
| } |
| |
| var r0 string |
| if rf, ok := ret.Get(0).(func() string); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' |
| type MockNPCI_String_Call struct { |
| *mock.Call |
| } |
| |
| // String is a helper method to define mock.On call |
| func (_e *MockNPCI_Expecter) String() *MockNPCI_String_Call { |
| return &MockNPCI_String_Call{Call: _e.mock.On("String")} |
| } |
| |
| func (_c *MockNPCI_String_Call) Run(run func()) *MockNPCI_String_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_String_Call) Return(_a0 string) *MockNPCI_String_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_String_Call) RunAndReturn(run func() string) *MockNPCI_String_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // Update provides a mock function with given fields: pci |
| func (_m *MockNPCI) Update(pci Arg) error { |
| ret := _m.Called(pci) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Update") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(Arg) error); ok { |
| r0 = rf(pci) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // MockNPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' |
| type MockNPCI_Update_Call struct { |
| *mock.Call |
| } |
| |
| // Update is a helper method to define mock.On call |
| // - pci Arg |
| func (_e *MockNPCI_Expecter) Update(pci interface{}) *MockNPCI_Update_Call { |
| return &MockNPCI_Update_Call{Call: _e.mock.On("Update", pci)} |
| } |
| |
| func (_c *MockNPCI_Update_Call) Run(run func(pci Arg)) *MockNPCI_Update_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(Arg)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_Update_Call) Return(_a0 error) *MockNPCI_Update_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockNPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockNPCI_Update_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // setNLM provides a mock function with given fields: nlm |
| func (_m *MockNPCI) setNLM(nlm model.NLM) { |
| _m.Called(nlm) |
| } |
| |
| // MockNPCI_setNLM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNLM' |
| type MockNPCI_setNLM_Call struct { |
| *mock.Call |
| } |
| |
| // setNLM is a helper method to define mock.On call |
| // - nlm model.NLM |
| func (_e *MockNPCI_Expecter) setNLM(nlm interface{}) *MockNPCI_setNLM_Call { |
| return &MockNPCI_setNLM_Call{Call: _e.mock.On("setNLM", nlm)} |
| } |
| |
| func (_c *MockNPCI_setNLM_Call) Run(run func(nlm model.NLM)) *MockNPCI_setNLM_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(model.NLM)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockNPCI_setNLM_Call) Return() *MockNPCI_setNLM_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockNPCI_setNLM_Call) RunAndReturn(run func(model.NLM)) *MockNPCI_setNLM_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // NewMockNPCI creates a new instance of MockNPCI. 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 NewMockNPCI(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *MockNPCI { |
| mock := &MockNPCI{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |