From c43562ba101c3314ab20025023f4bd08e16c3d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20R=C3=BChl?= Date: Wed, 21 Aug 2024 11:38:45 +0200 Subject: [PATCH] fix(bacnet): typo in NLM --- plc4go/internal/bacnetip/NetworkService.go | 12 +- plc4go/internal/bacnetip/mock_APCI_test.go | 443 ++++++ .../bacnetip/mock_AtomicContract_test.go | 234 +++ .../bacnetip/mock_AtomicRequirements_test.go | 97 ++ .../bacnetip/mock_BitStringExtension_test.go | 188 +++ .../mock_ComparableAndOrdered_test.go | 51 + .../bacnetip/mock_EnumeratedContract_test.go | 178 +++ plc4go/internal/bacnetip/mock_IPCI_test.go | 352 +++++ plc4go/internal/bacnetip/mock_NPCI_test.go | 615 ++++++++ plc4go/internal/bacnetip/mock_NPDU_test.go | 1129 ++++++++++++++ .../bacnetip/mock_NetworkNode_test.go | 346 +++++ .../mock_NodeNetworkReference_test.go | 130 ++ .../bacnetip/mock_ObjectTypeContract_test.go | 211 +++ plc4go/internal/bacnetip/mock_PCI_test.go | 443 ++++++ plc4go/internal/bacnetip/mock_PDUData_test.go | 499 ++++++ plc4go/internal/bacnetip/mock_PDU_test.go | 541 +++++++ plc4go/internal/bacnetip/mock_Tag_test.go | 497 ++++++ .../bacnetip/mock_TaskManager_test.go | 417 +++++ .../bacnetip/mock_TrafficLogger_test.go | 84 + .../mock__PDUDataRequirements_test.go | 98 ++ .../tests/mock_StateInterceptor_test.go | 219 +++ .../mock_StateMachineRequirements_test.go | 101 ++ .../bacnetip/tests/mock_StateMachine_test.go | 1092 +++++++++++++ .../bacnetip/tests/mock_State_test.go | 1350 +++++++++++++++++ ...licationServiceElementRequirements_test.go | 242 +++ .../tests/mock_TrappedClientContract_test.go | 148 ++ .../tests/mock_TrappedServerContract_test.go | 148 ++ ...ppedServiceAccessPointRequirements_test.go | 242 +++ .../tests/mock_TrapperRequirements_test.go | 219 +++ ...ock_ApplicationNetworkRequirements_test.go | 148 ++ ...pplicationStateMachineRequirements_test.go | 148 ++ ..._COVTestClientServicesRequirements_test.go | 51 + .../bacnetip/readwrite/ParserHelper.go | 4 +- .../bacnetip/readwrite/XmlParserHelper.go | 4 +- .../protocols/bacnetip/readwrite/model/NLM.go | 8 +- ...gTable.go => NLMInitializeRoutingTable.go} | 92 +- ...Ack.go => NLMInitializeRoutingTableAck.go} | 92 +- ...> NLMInitializeRoutingTablePortMapping.go} | 84 +- .../plc4x/java/bacnetip/readwrite/NLM.java | 4 +- ...le.java => NLMInitializeRoutingTable.java} | 48 +- ...java => NLMInitializeRoutingTableAck.java} | 48 +- ...NLMInitializeRoutingTablePortMapping.java} | 30 +- .../protocols/umas/readwrite/UmasPDUItem.py | 1 - .../protocols/bacnetip/bacnetip.mspec | 10 +- 44 files changed, 10879 insertions(+), 219 deletions(-) create mode 100644 plc4go/internal/bacnetip/mock_APCI_test.go create mode 100644 plc4go/internal/bacnetip/mock_AtomicContract_test.go create mode 100644 plc4go/internal/bacnetip/mock_AtomicRequirements_test.go create mode 100644 plc4go/internal/bacnetip/mock_BitStringExtension_test.go create mode 100644 plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go create mode 100644 plc4go/internal/bacnetip/mock_EnumeratedContract_test.go create mode 100644 plc4go/internal/bacnetip/mock_IPCI_test.go create mode 100644 plc4go/internal/bacnetip/mock_NPCI_test.go create mode 100644 plc4go/internal/bacnetip/mock_NPDU_test.go create mode 100644 plc4go/internal/bacnetip/mock_NetworkNode_test.go create mode 100644 plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go create mode 100644 plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go create mode 100644 plc4go/internal/bacnetip/mock_PCI_test.go create mode 100644 plc4go/internal/bacnetip/mock_PDUData_test.go create mode 100644 plc4go/internal/bacnetip/mock_Tag_test.go create mode 100644 plc4go/internal/bacnetip/mock_TaskManager_test.go create mode 100644 plc4go/internal/bacnetip/mock_TrafficLogger_test.go create mode 100644 plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_StateMachine_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_State_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go create mode 100644 plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go rename plc4go/protocols/bacnetip/readwrite/model/{NLMInitalizeRoutingTable.go => NLMInitializeRoutingTable.go} (64%) rename plc4go/protocols/bacnetip/readwrite/model/{NLMInitalizeRoutingTableAck.go => NLMInitializeRoutingTableAck.go} (63%) rename plc4go/protocols/bacnetip/readwrite/model/{NLMInitalizeRoutingTablePortMapping.go => NLMInitializeRoutingTablePortMapping.go} (61%) rename plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/{NLMInitalizeRoutingTable.java => NLMInitializeRoutingTable.java} (74%) rename plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/{NLMInitalizeRoutingTableAck.java => NLMInitializeRoutingTableAck.java} (74%) rename plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/{NLMInitalizeRoutingTablePortMapping.java => NLMInitializeRoutingTablePortMapping.java} (84%) diff --git a/plc4go/internal/bacnetip/NetworkService.go b/plc4go/internal/bacnetip/NetworkService.go index 32eb5d2e803..441b48e6680 100644 --- a/plc4go/internal/bacnetip/NetworkService.go +++ b/plc4go/internal/bacnetip/NetworkService.go @@ -1043,9 +1043,9 @@ func (n *NetworkServiceElement) Indication(args Args, kwargs KWArgs) error { n.RouterBusyToNetwork(adapter, nlm) case readWriteModel.NLMRouterAvailableToNetwork: n.RouterAvailableToNetwork(adapter, nlm) - case readWriteModel.NLMInitalizeRoutingTable: + case readWriteModel.NLMInitializeRoutingTable: n.InitalizeRoutingTable(adapter, nlm) - case readWriteModel.NLMInitalizeRoutingTableAck: + case readWriteModel.NLMInitializeRoutingTableAck: n.InitalizeRoutingTableAck(adapter, nlm) case readWriteModel.NLMEstablishConnectionToNetwork: n.EstablishConnectionToNetwork(adapter, nlm) @@ -1085,9 +1085,9 @@ func (n *NetworkServiceElement) Confirmation(args Args, kwargs KWArgs) error { n.RouterBusyToNetwork(adapter, nlm) case readWriteModel.NLMRouterAvailableToNetwork: n.RouterAvailableToNetwork(adapter, nlm) - case readWriteModel.NLMInitalizeRoutingTable: + case readWriteModel.NLMInitializeRoutingTable: n.InitalizeRoutingTable(adapter, nlm) - case readWriteModel.NLMInitalizeRoutingTableAck: + case readWriteModel.NLMInitializeRoutingTableAck: n.InitalizeRoutingTableAck(adapter, nlm) case readWriteModel.NLMEstablishConnectionToNetwork: n.EstablishConnectionToNetwork(adapter, nlm) @@ -1244,11 +1244,11 @@ func (n *NetworkServiceElement) RouterAvailableToNetwork(adapter *NetworkAdapter // TODO: implement me } -func (n *NetworkServiceElement) InitalizeRoutingTable(adapter *NetworkAdapter, nlm readWriteModel.NLMInitalizeRoutingTable) { +func (n *NetworkServiceElement) InitalizeRoutingTable(adapter *NetworkAdapter, nlm readWriteModel.NLMInitializeRoutingTable) { // TODO: implement me } -func (n *NetworkServiceElement) InitalizeRoutingTableAck(adapter *NetworkAdapter, nlm readWriteModel.NLMInitalizeRoutingTableAck) { +func (n *NetworkServiceElement) InitalizeRoutingTableAck(adapter *NetworkAdapter, nlm readWriteModel.NLMInitializeRoutingTableAck) { // TODO: implement me } diff --git a/plc4go/internal/bacnetip/mock_APCI_test.go b/plc4go/internal/bacnetip/mock_APCI_test.go new file mode 100644 index 00000000000..5c58ce6215f --- /dev/null +++ b/plc4go/internal/bacnetip/mock_APCI_test.go @@ -0,0 +1,443 @@ +/* + * 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" +) + +// MockAPCI is an autogenerated mock type for the APCI type +type MockAPCI struct { + mock.Mock +} + +type MockAPCI_Expecter struct { + mock *mock.Mock +} + +func (_m *MockAPCI) EXPECT() *MockAPCI_Expecter { + return &MockAPCI_Expecter{mock: &_m.Mock} +} + +// GetExpectingReply provides a mock function with given fields: +func (_m *MockAPCI) 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 +} + +// MockAPCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' +type MockAPCI_GetExpectingReply_Call struct { + *mock.Call +} + +// GetExpectingReply is a helper method to define mock.On call +func (_e *MockAPCI_Expecter) GetExpectingReply() *MockAPCI_GetExpectingReply_Call { + return &MockAPCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} +} + +func (_c *MockAPCI_GetExpectingReply_Call) Run(run func()) *MockAPCI_GetExpectingReply_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPCI_GetExpectingReply_Call) Return(_a0 bool) *MockAPCI_GetExpectingReply_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockAPCI_GetExpectingReply_Call { + _c.Call.Return(run) + return _c +} + +// GetNetworkPriority provides a mock function with given fields: +func (_m *MockAPCI) 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 +} + +// MockAPCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' +type MockAPCI_GetNetworkPriority_Call struct { + *mock.Call +} + +// GetNetworkPriority is a helper method to define mock.On call +func (_e *MockAPCI_Expecter) GetNetworkPriority() *MockAPCI_GetNetworkPriority_Call { + return &MockAPCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} +} + +func (_c *MockAPCI_GetNetworkPriority_Call) Run(run func()) *MockAPCI_GetNetworkPriority_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockAPCI_GetNetworkPriority_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockAPCI_GetNetworkPriority_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUDestination provides a mock function with given fields: +func (_m *MockAPCI) 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 +} + +// MockAPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' +type MockAPCI_GetPDUDestination_Call struct { + *mock.Call +} + +// GetPDUDestination is a helper method to define mock.On call +func (_e *MockAPCI_Expecter) GetPDUDestination() *MockAPCI_GetPDUDestination_Call { + return &MockAPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} +} + +func (_c *MockAPCI_GetPDUDestination_Call) Run(run func()) *MockAPCI_GetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockAPCI_GetPDUDestination_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockAPCI_GetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUSource provides a mock function with given fields: +func (_m *MockAPCI) 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 +} + +// MockAPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' +type MockAPCI_GetPDUSource_Call struct { + *mock.Call +} + +// GetPDUSource is a helper method to define mock.On call +func (_e *MockAPCI_Expecter) GetPDUSource() *MockAPCI_GetPDUSource_Call { + return &MockAPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} +} + +func (_c *MockAPCI_GetPDUSource_Call) Run(run func()) *MockAPCI_GetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPCI_GetPDUSource_Call) Return(_a0 *Address) *MockAPCI_GetPDUSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockAPCI_GetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUUserData provides a mock function with given fields: +func (_m *MockAPCI) 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 +} + +// MockAPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' +type MockAPCI_GetPDUUserData_Call struct { + *mock.Call +} + +// GetPDUUserData is a helper method to define mock.On call +func (_e *MockAPCI_Expecter) GetPDUUserData() *MockAPCI_GetPDUUserData_Call { + return &MockAPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} +} + +func (_c *MockAPCI_GetPDUUserData_Call) Run(run func()) *MockAPCI_GetPDUUserData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockAPCI_GetPDUUserData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockAPCI_GetPDUUserData_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUDestination provides a mock function with given fields: _a0 +func (_m *MockAPCI) SetPDUDestination(_a0 *Address) { + _m.Called(_a0) +} + +// MockAPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' +type MockAPCI_SetPDUDestination_Call struct { + *mock.Call +} + +// SetPDUDestination is a helper method to define mock.On call +// - _a0 *Address +func (_e *MockAPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockAPCI_SetPDUDestination_Call { + return &MockAPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} +} + +func (_c *MockAPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockAPCI_SetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockAPCI_SetPDUDestination_Call) Return() *MockAPCI_SetPDUDestination_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockAPCI_SetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUSource provides a mock function with given fields: source +func (_m *MockAPCI) SetPDUSource(source *Address) { + _m.Called(source) +} + +// MockAPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' +type MockAPCI_SetPDUSource_Call struct { + *mock.Call +} + +// SetPDUSource is a helper method to define mock.On call +// - source *Address +func (_e *MockAPCI_Expecter) SetPDUSource(source interface{}) *MockAPCI_SetPDUSource_Call { + return &MockAPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} +} + +func (_c *MockAPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockAPCI_SetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockAPCI_SetPDUSource_Call) Return() *MockAPCI_SetPDUSource_Call { + _c.Call.Return() + return _c +} + +func (_c *MockAPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockAPCI_SetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockAPCI) 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 +} + +// MockAPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockAPCI_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockAPCI_Expecter) String() *MockAPCI_String_Call { + return &MockAPCI_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockAPCI_String_Call) Run(run func()) *MockAPCI_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAPCI_String_Call) Return(_a0 string) *MockAPCI_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_String_Call) RunAndReturn(run func() string) *MockAPCI_String_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: pci +func (_m *MockAPCI) 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 +} + +// MockAPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockAPCI_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - pci Arg +func (_e *MockAPCI_Expecter) Update(pci interface{}) *MockAPCI_Update_Call { + return &MockAPCI_Update_Call{Call: _e.mock.On("Update", pci)} +} + +func (_c *MockAPCI_Update_Call) Run(run func(pci Arg)) *MockAPCI_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockAPCI_Update_Call) Return(_a0 error) *MockAPCI_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockAPCI_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockAPCI creates a new instance of MockAPCI. 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 NewMockAPCI(t interface { + mock.TestingT + Cleanup(func()) +}) *MockAPCI { + mock := &MockAPCI{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_AtomicContract_test.go b/plc4go/internal/bacnetip/mock_AtomicContract_test.go new file mode 100644 index 00000000000..de517e6c0b3 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_AtomicContract_test.go @@ -0,0 +1,234 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockAtomicContract is an autogenerated mock type for the AtomicContract type +type MockAtomicContract[T ComparableAndOrdered] struct { + mock.Mock +} + +type MockAtomicContract_Expecter[T ComparableAndOrdered] struct { + mock *mock.Mock +} + +func (_m *MockAtomicContract[T]) EXPECT() *MockAtomicContract_Expecter[T] { + return &MockAtomicContract_Expecter[T]{mock: &_m.Mock} +} + +// Compare provides a mock function with given fields: other +func (_m *MockAtomicContract[T]) Compare(other interface{}) int { + ret := _m.Called(other) + + if len(ret) == 0 { + panic("no return value specified for Compare") + } + + var r0 int + if rf, ok := ret.Get(0).(func(interface{}) int); ok { + r0 = rf(other) + } else { + r0 = ret.Get(0).(int) + } + + return r0 +} + +// MockAtomicContract_Compare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compare' +type MockAtomicContract_Compare_Call[T ComparableAndOrdered] struct { + *mock.Call +} + +// Compare is a helper method to define mock.On call +// - other interface{} +func (_e *MockAtomicContract_Expecter[T]) Compare(other interface{}) *MockAtomicContract_Compare_Call[T] { + return &MockAtomicContract_Compare_Call[T]{Call: _e.mock.On("Compare", other)} +} + +func (_c *MockAtomicContract_Compare_Call[T]) Run(run func(other interface{})) *MockAtomicContract_Compare_Call[T] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *MockAtomicContract_Compare_Call[T]) Return(_a0 int) *MockAtomicContract_Compare_Call[T] { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAtomicContract_Compare_Call[T]) RunAndReturn(run func(interface{}) int) *MockAtomicContract_Compare_Call[T] { + _c.Call.Return(run) + return _c +} + +// Equals provides a mock function with given fields: other +func (_m *MockAtomicContract[T]) Equals(other interface{}) bool { + ret := _m.Called(other) + + if len(ret) == 0 { + panic("no return value specified for Equals") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(interface{}) bool); ok { + r0 = rf(other) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAtomicContract_Equals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equals' +type MockAtomicContract_Equals_Call[T ComparableAndOrdered] struct { + *mock.Call +} + +// Equals is a helper method to define mock.On call +// - other interface{} +func (_e *MockAtomicContract_Expecter[T]) Equals(other interface{}) *MockAtomicContract_Equals_Call[T] { + return &MockAtomicContract_Equals_Call[T]{Call: _e.mock.On("Equals", other)} +} + +func (_c *MockAtomicContract_Equals_Call[T]) Run(run func(other interface{})) *MockAtomicContract_Equals_Call[T] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *MockAtomicContract_Equals_Call[T]) Return(_a0 bool) *MockAtomicContract_Equals_Call[T] { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAtomicContract_Equals_Call[T]) RunAndReturn(run func(interface{}) bool) *MockAtomicContract_Equals_Call[T] { + _c.Call.Return(run) + return _c +} + +// GetValue provides a mock function with given fields: +func (_m *MockAtomicContract[T]) GetValue() T { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetValue") + } + + var r0 T + if rf, ok := ret.Get(0).(func() T); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(T) + } + + return r0 +} + +// MockAtomicContract_GetValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValue' +type MockAtomicContract_GetValue_Call[T ComparableAndOrdered] struct { + *mock.Call +} + +// GetValue is a helper method to define mock.On call +func (_e *MockAtomicContract_Expecter[T]) GetValue() *MockAtomicContract_GetValue_Call[T] { + return &MockAtomicContract_GetValue_Call[T]{Call: _e.mock.On("GetValue")} +} + +func (_c *MockAtomicContract_GetValue_Call[T]) Run(run func()) *MockAtomicContract_GetValue_Call[T] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockAtomicContract_GetValue_Call[T]) Return(_a0 T) *MockAtomicContract_GetValue_Call[T] { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAtomicContract_GetValue_Call[T]) RunAndReturn(run func() T) *MockAtomicContract_GetValue_Call[T] { + _c.Call.Return(run) + return _c +} + +// LowerThan provides a mock function with given fields: other +func (_m *MockAtomicContract[T]) LowerThan(other interface{}) bool { + ret := _m.Called(other) + + if len(ret) == 0 { + panic("no return value specified for LowerThan") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(interface{}) bool); ok { + r0 = rf(other) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAtomicContract_LowerThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LowerThan' +type MockAtomicContract_LowerThan_Call[T ComparableAndOrdered] struct { + *mock.Call +} + +// LowerThan is a helper method to define mock.On call +// - other interface{} +func (_e *MockAtomicContract_Expecter[T]) LowerThan(other interface{}) *MockAtomicContract_LowerThan_Call[T] { + return &MockAtomicContract_LowerThan_Call[T]{Call: _e.mock.On("LowerThan", other)} +} + +func (_c *MockAtomicContract_LowerThan_Call[T]) Run(run func(other interface{})) *MockAtomicContract_LowerThan_Call[T] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *MockAtomicContract_LowerThan_Call[T]) Return(_a0 bool) *MockAtomicContract_LowerThan_Call[T] { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAtomicContract_LowerThan_Call[T]) RunAndReturn(run func(interface{}) bool) *MockAtomicContract_LowerThan_Call[T] { + _c.Call.Return(run) + return _c +} + +// NewMockAtomicContract creates a new instance of MockAtomicContract. 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 NewMockAtomicContract[T ComparableAndOrdered](t interface { + mock.TestingT + Cleanup(func()) +}) *MockAtomicContract[T] { + mock := &MockAtomicContract[T]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_AtomicRequirements_test.go b/plc4go/internal/bacnetip/mock_AtomicRequirements_test.go new file mode 100644 index 00000000000..8bb378bf641 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_AtomicRequirements_test.go @@ -0,0 +1,97 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockAtomicRequirements is an autogenerated mock type for the AtomicRequirements type +type MockAtomicRequirements struct { + mock.Mock +} + +type MockAtomicRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockAtomicRequirements) EXPECT() *MockAtomicRequirements_Expecter { + return &MockAtomicRequirements_Expecter{mock: &_m.Mock} +} + +// IsValid provides a mock function with given fields: arg +func (_m *MockAtomicRequirements) IsValid(arg interface{}) bool { + ret := _m.Called(arg) + + if len(ret) == 0 { + panic("no return value specified for IsValid") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(interface{}) bool); ok { + r0 = rf(arg) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockAtomicRequirements_IsValid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsValid' +type MockAtomicRequirements_IsValid_Call struct { + *mock.Call +} + +// IsValid is a helper method to define mock.On call +// - arg interface{} +func (_e *MockAtomicRequirements_Expecter) IsValid(arg interface{}) *MockAtomicRequirements_IsValid_Call { + return &MockAtomicRequirements_IsValid_Call{Call: _e.mock.On("IsValid", arg)} +} + +func (_c *MockAtomicRequirements_IsValid_Call) Run(run func(arg interface{})) *MockAtomicRequirements_IsValid_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *MockAtomicRequirements_IsValid_Call) Return(_a0 bool) *MockAtomicRequirements_IsValid_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockAtomicRequirements_IsValid_Call) RunAndReturn(run func(interface{}) bool) *MockAtomicRequirements_IsValid_Call { + _c.Call.Return(run) + return _c +} + +// NewMockAtomicRequirements creates a new instance of MockAtomicRequirements. 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 NewMockAtomicRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockAtomicRequirements { + mock := &MockAtomicRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_BitStringExtension_test.go b/plc4go/internal/bacnetip/mock_BitStringExtension_test.go new file mode 100644 index 00000000000..4524dd825f8 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_BitStringExtension_test.go @@ -0,0 +1,188 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockBitStringExtension is an autogenerated mock type for the BitStringExtension type +type MockBitStringExtension struct { + mock.Mock +} + +type MockBitStringExtension_Expecter struct { + mock *mock.Mock +} + +func (_m *MockBitStringExtension) EXPECT() *MockBitStringExtension_Expecter { + return &MockBitStringExtension_Expecter{mock: &_m.Mock} +} + +// GetBitLen provides a mock function with given fields: +func (_m *MockBitStringExtension) GetBitLen() int { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBitLen") + } + + var r0 int + if rf, ok := ret.Get(0).(func() int); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int) + } + + return r0 +} + +// MockBitStringExtension_GetBitLen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBitLen' +type MockBitStringExtension_GetBitLen_Call struct { + *mock.Call +} + +// GetBitLen is a helper method to define mock.On call +func (_e *MockBitStringExtension_Expecter) GetBitLen() *MockBitStringExtension_GetBitLen_Call { + return &MockBitStringExtension_GetBitLen_Call{Call: _e.mock.On("GetBitLen")} +} + +func (_c *MockBitStringExtension_GetBitLen_Call) Run(run func()) *MockBitStringExtension_GetBitLen_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockBitStringExtension_GetBitLen_Call) Return(_a0 int) *MockBitStringExtension_GetBitLen_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBitStringExtension_GetBitLen_Call) RunAndReturn(run func() int) *MockBitStringExtension_GetBitLen_Call { + _c.Call.Return(run) + return _c +} + +// GetBitNames provides a mock function with given fields: +func (_m *MockBitStringExtension) GetBitNames() map[string]int { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBitNames") + } + + var r0 map[string]int + if rf, ok := ret.Get(0).(func() map[string]int); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]int) + } + } + + return r0 +} + +// MockBitStringExtension_GetBitNames_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBitNames' +type MockBitStringExtension_GetBitNames_Call struct { + *mock.Call +} + +// GetBitNames is a helper method to define mock.On call +func (_e *MockBitStringExtension_Expecter) GetBitNames() *MockBitStringExtension_GetBitNames_Call { + return &MockBitStringExtension_GetBitNames_Call{Call: _e.mock.On("GetBitNames")} +} + +func (_c *MockBitStringExtension_GetBitNames_Call) Run(run func()) *MockBitStringExtension_GetBitNames_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockBitStringExtension_GetBitNames_Call) Return(_a0 map[string]int) *MockBitStringExtension_GetBitNames_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBitStringExtension_GetBitNames_Call) RunAndReturn(run func() map[string]int) *MockBitStringExtension_GetBitNames_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockBitStringExtension) 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 +} + +// MockBitStringExtension_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockBitStringExtension_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockBitStringExtension_Expecter) String() *MockBitStringExtension_String_Call { + return &MockBitStringExtension_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockBitStringExtension_String_Call) Run(run func()) *MockBitStringExtension_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockBitStringExtension_String_Call) Return(_a0 string) *MockBitStringExtension_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBitStringExtension_String_Call) RunAndReturn(run func() string) *MockBitStringExtension_String_Call { + _c.Call.Return(run) + return _c +} + +// NewMockBitStringExtension creates a new instance of MockBitStringExtension. 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 NewMockBitStringExtension(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBitStringExtension { + mock := &MockBitStringExtension{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go b/plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go new file mode 100644 index 00000000000..7960ab74d4a --- /dev/null +++ b/plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go @@ -0,0 +1,51 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockComparableAndOrdered is an autogenerated mock type for the ComparableAndOrdered type +type MockComparableAndOrdered struct { + mock.Mock +} + +type MockComparableAndOrdered_Expecter struct { + mock *mock.Mock +} + +func (_m *MockComparableAndOrdered) EXPECT() *MockComparableAndOrdered_Expecter { + return &MockComparableAndOrdered_Expecter{mock: &_m.Mock} +} + +// NewMockComparableAndOrdered creates a new instance of MockComparableAndOrdered. 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 NewMockComparableAndOrdered(t interface { + mock.TestingT + Cleanup(func()) +}) *MockComparableAndOrdered { + mock := &MockComparableAndOrdered{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_EnumeratedContract_test.go b/plc4go/internal/bacnetip/mock_EnumeratedContract_test.go new file mode 100644 index 00000000000..19e8a04399e --- /dev/null +++ b/plc4go/internal/bacnetip/mock_EnumeratedContract_test.go @@ -0,0 +1,178 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockEnumeratedContract is an autogenerated mock type for the EnumeratedContract type +type MockEnumeratedContract struct { + mock.Mock +} + +type MockEnumeratedContract_Expecter struct { + mock *mock.Mock +} + +func (_m *MockEnumeratedContract) EXPECT() *MockEnumeratedContract_Expecter { + return &MockEnumeratedContract_Expecter{mock: &_m.Mock} +} + +// GetEnumerations provides a mock function with given fields: +func (_m *MockEnumeratedContract) GetEnumerations() map[string]uint64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEnumerations") + } + + var r0 map[string]uint64 + if rf, ok := ret.Get(0).(func() map[string]uint64); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]uint64) + } + } + + return r0 +} + +// MockEnumeratedContract_GetEnumerations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnumerations' +type MockEnumeratedContract_GetEnumerations_Call struct { + *mock.Call +} + +// GetEnumerations is a helper method to define mock.On call +func (_e *MockEnumeratedContract_Expecter) GetEnumerations() *MockEnumeratedContract_GetEnumerations_Call { + return &MockEnumeratedContract_GetEnumerations_Call{Call: _e.mock.On("GetEnumerations")} +} + +func (_c *MockEnumeratedContract_GetEnumerations_Call) Run(run func()) *MockEnumeratedContract_GetEnumerations_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockEnumeratedContract_GetEnumerations_Call) Return(_a0 map[string]uint64) *MockEnumeratedContract_GetEnumerations_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockEnumeratedContract_GetEnumerations_Call) RunAndReturn(run func() map[string]uint64) *MockEnumeratedContract_GetEnumerations_Call { + _c.Call.Return(run) + return _c +} + +// GetXlateTable provides a mock function with given fields: +func (_m *MockEnumeratedContract) GetXlateTable() map[interface{}]interface{} { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetXlateTable") + } + + var r0 map[interface{}]interface{} + if rf, ok := ret.Get(0).(func() map[interface{}]interface{}); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[interface{}]interface{}) + } + } + + return r0 +} + +// MockEnumeratedContract_GetXlateTable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetXlateTable' +type MockEnumeratedContract_GetXlateTable_Call struct { + *mock.Call +} + +// GetXlateTable is a helper method to define mock.On call +func (_e *MockEnumeratedContract_Expecter) GetXlateTable() *MockEnumeratedContract_GetXlateTable_Call { + return &MockEnumeratedContract_GetXlateTable_Call{Call: _e.mock.On("GetXlateTable")} +} + +func (_c *MockEnumeratedContract_GetXlateTable_Call) Run(run func()) *MockEnumeratedContract_GetXlateTable_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockEnumeratedContract_GetXlateTable_Call) Return(_a0 map[interface{}]interface{}) *MockEnumeratedContract_GetXlateTable_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockEnumeratedContract_GetXlateTable_Call) RunAndReturn(run func() map[interface{}]interface{}) *MockEnumeratedContract_GetXlateTable_Call { + _c.Call.Return(run) + return _c +} + +// SetEnumerated provides a mock function with given fields: enumerated +func (_m *MockEnumeratedContract) SetEnumerated(enumerated *Enumerated) { + _m.Called(enumerated) +} + +// MockEnumeratedContract_SetEnumerated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEnumerated' +type MockEnumeratedContract_SetEnumerated_Call struct { + *mock.Call +} + +// SetEnumerated is a helper method to define mock.On call +// - enumerated *Enumerated +func (_e *MockEnumeratedContract_Expecter) SetEnumerated(enumerated interface{}) *MockEnumeratedContract_SetEnumerated_Call { + return &MockEnumeratedContract_SetEnumerated_Call{Call: _e.mock.On("SetEnumerated", enumerated)} +} + +func (_c *MockEnumeratedContract_SetEnumerated_Call) Run(run func(enumerated *Enumerated)) *MockEnumeratedContract_SetEnumerated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Enumerated)) + }) + return _c +} + +func (_c *MockEnumeratedContract_SetEnumerated_Call) Return() *MockEnumeratedContract_SetEnumerated_Call { + _c.Call.Return() + return _c +} + +func (_c *MockEnumeratedContract_SetEnumerated_Call) RunAndReturn(run func(*Enumerated)) *MockEnumeratedContract_SetEnumerated_Call { + _c.Call.Return(run) + return _c +} + +// NewMockEnumeratedContract creates a new instance of MockEnumeratedContract. 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 NewMockEnumeratedContract(t interface { + mock.TestingT + Cleanup(func()) +}) *MockEnumeratedContract { + mock := &MockEnumeratedContract{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_IPCI_test.go b/plc4go/internal/bacnetip/mock_IPCI_test.go new file mode 100644 index 00000000000..2689864a4c4 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_IPCI_test.go @@ -0,0 +1,352 @@ +/* + * 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 ( + spi "github.com/apache/plc4x/plc4go/spi" + mock "github.com/stretchr/testify/mock" +) + +// MockIPCI is an autogenerated mock type for the IPCI type +type MockIPCI struct { + mock.Mock +} + +type MockIPCI_Expecter struct { + mock *mock.Mock +} + +func (_m *MockIPCI) EXPECT() *MockIPCI_Expecter { + return &MockIPCI_Expecter{mock: &_m.Mock} +} + +// GetPDUDestination provides a mock function with given fields: +func (_m *MockIPCI) 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 +} + +// MockIPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' +type MockIPCI_GetPDUDestination_Call struct { + *mock.Call +} + +// GetPDUDestination is a helper method to define mock.On call +func (_e *MockIPCI_Expecter) GetPDUDestination() *MockIPCI_GetPDUDestination_Call { + return &MockIPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} +} + +func (_c *MockIPCI_GetPDUDestination_Call) Run(run func()) *MockIPCI_GetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockIPCI_GetPDUDestination_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockIPCI_GetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUSource provides a mock function with given fields: +func (_m *MockIPCI) 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 +} + +// MockIPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' +type MockIPCI_GetPDUSource_Call struct { + *mock.Call +} + +// GetPDUSource is a helper method to define mock.On call +func (_e *MockIPCI_Expecter) GetPDUSource() *MockIPCI_GetPDUSource_Call { + return &MockIPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} +} + +func (_c *MockIPCI_GetPDUSource_Call) Run(run func()) *MockIPCI_GetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIPCI_GetPDUSource_Call) Return(_a0 *Address) *MockIPCI_GetPDUSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockIPCI_GetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUUserData provides a mock function with given fields: +func (_m *MockIPCI) 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 +} + +// MockIPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' +type MockIPCI_GetPDUUserData_Call struct { + *mock.Call +} + +// GetPDUUserData is a helper method to define mock.On call +func (_e *MockIPCI_Expecter) GetPDUUserData() *MockIPCI_GetPDUUserData_Call { + return &MockIPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} +} + +func (_c *MockIPCI_GetPDUUserData_Call) Run(run func()) *MockIPCI_GetPDUUserData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockIPCI_GetPDUUserData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockIPCI_GetPDUUserData_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUDestination provides a mock function with given fields: _a0 +func (_m *MockIPCI) SetPDUDestination(_a0 *Address) { + _m.Called(_a0) +} + +// MockIPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' +type MockIPCI_SetPDUDestination_Call struct { + *mock.Call +} + +// SetPDUDestination is a helper method to define mock.On call +// - _a0 *Address +func (_e *MockIPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockIPCI_SetPDUDestination_Call { + return &MockIPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} +} + +func (_c *MockIPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockIPCI_SetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockIPCI_SetPDUDestination_Call) Return() *MockIPCI_SetPDUDestination_Call { + _c.Call.Return() + return _c +} + +func (_c *MockIPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockIPCI_SetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUSource provides a mock function with given fields: source +func (_m *MockIPCI) SetPDUSource(source *Address) { + _m.Called(source) +} + +// MockIPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' +type MockIPCI_SetPDUSource_Call struct { + *mock.Call +} + +// SetPDUSource is a helper method to define mock.On call +// - source *Address +func (_e *MockIPCI_Expecter) SetPDUSource(source interface{}) *MockIPCI_SetPDUSource_Call { + return &MockIPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} +} + +func (_c *MockIPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockIPCI_SetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockIPCI_SetPDUSource_Call) Return() *MockIPCI_SetPDUSource_Call { + _c.Call.Return() + return _c +} + +func (_c *MockIPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockIPCI_SetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockIPCI) 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 +} + +// MockIPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockIPCI_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockIPCI_Expecter) String() *MockIPCI_String_Call { + return &MockIPCI_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockIPCI_String_Call) Run(run func()) *MockIPCI_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIPCI_String_Call) Return(_a0 string) *MockIPCI_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIPCI_String_Call) RunAndReturn(run func() string) *MockIPCI_String_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: pci +func (_m *MockIPCI) 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 +} + +// MockIPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockIPCI_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - pci Arg +func (_e *MockIPCI_Expecter) Update(pci interface{}) *MockIPCI_Update_Call { + return &MockIPCI_Update_Call{Call: _e.mock.On("Update", pci)} +} + +func (_c *MockIPCI_Update_Call) Run(run func(pci Arg)) *MockIPCI_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockIPCI_Update_Call) Return(_a0 error) *MockIPCI_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockIPCI_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockIPCI creates a new instance of MockIPCI. 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 NewMockIPCI(t interface { + mock.TestingT + Cleanup(func()) +}) *MockIPCI { + mock := &MockIPCI{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_NPCI_test.go b/plc4go/internal/bacnetip/mock_NPCI_test.go new file mode 100644 index 00000000000..c80a69d88cd --- /dev/null +++ b/plc4go/internal/bacnetip/mock_NPCI_test.go @@ -0,0 +1,615 @@ +/* + * 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 +} + +// 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 +} diff --git a/plc4go/internal/bacnetip/mock_NPDU_test.go b/plc4go/internal/bacnetip/mock_NPDU_test.go new file mode 100644 index 00000000000..99ba7c21481 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_NPDU_test.go @@ -0,0 +1,1129 @@ +/* + * 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" +) + +// MockNPDU is an autogenerated mock type for the NPDU type +type MockNPDU struct { + mock.Mock +} + +type MockNPDU_Expecter struct { + mock *mock.Mock +} + +func (_m *MockNPDU) EXPECT() *MockNPDU_Expecter { + return &MockNPDU_Expecter{mock: &_m.Mock} +} + +// Decode provides a mock function with given fields: pdu +func (_m *MockNPDU) 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 +} + +// MockNPDU_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' +type MockNPDU_Decode_Call struct { + *mock.Call +} + +// Decode is a helper method to define mock.On call +// - pdu Arg +func (_e *MockNPDU_Expecter) Decode(pdu interface{}) *MockNPDU_Decode_Call { + return &MockNPDU_Decode_Call{Call: _e.mock.On("Decode", pdu)} +} + +func (_c *MockNPDU_Decode_Call) Run(run func(pdu Arg)) *MockNPDU_Decode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockNPDU_Decode_Call) Return(_a0 error) *MockNPDU_Decode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_Decode_Call) RunAndReturn(run func(Arg) error) *MockNPDU_Decode_Call { + _c.Call.Return(run) + return _c +} + +// Encode provides a mock function with given fields: pdu +func (_m *MockNPDU) 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 +} + +// MockNPDU_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' +type MockNPDU_Encode_Call struct { + *mock.Call +} + +// Encode is a helper method to define mock.On call +// - pdu Arg +func (_e *MockNPDU_Expecter) Encode(pdu interface{}) *MockNPDU_Encode_Call { + return &MockNPDU_Encode_Call{Call: _e.mock.On("Encode", pdu)} +} + +func (_c *MockNPDU_Encode_Call) Run(run func(pdu Arg)) *MockNPDU_Encode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockNPDU_Encode_Call) Return(_a0 error) *MockNPDU_Encode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_Encode_Call) RunAndReturn(run func(Arg) error) *MockNPDU_Encode_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: +func (_m *MockNPDU) Get() (byte, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 byte + var r1 error + if rf, ok := ret.Get(0).(func() (byte, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() byte); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(byte) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNPDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockNPDU_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) Get() *MockNPDU_Get_Call { + return &MockNPDU_Get_Call{Call: _e.mock.On("Get")} +} + +func (_c *MockNPDU_Get_Call) Run(run func()) *MockNPDU_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_Get_Call) Return(_a0 byte, _a1 error) *MockNPDU_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNPDU_Get_Call) RunAndReturn(run func() (byte, error)) *MockNPDU_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetData provides a mock function with given fields: dlen +func (_m *MockNPDU) GetData(dlen int) ([]byte, error) { + ret := _m.Called(dlen) + + if len(ret) == 0 { + panic("no return value specified for GetData") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { + return rf(dlen) + } + if rf, ok := ret.Get(0).(func(int) []byte); ok { + r0 = rf(dlen) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(int) error); ok { + r1 = rf(dlen) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNPDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' +type MockNPDU_GetData_Call struct { + *mock.Call +} + +// GetData is a helper method to define mock.On call +// - dlen int +func (_e *MockNPDU_Expecter) GetData(dlen interface{}) *MockNPDU_GetData_Call { + return &MockNPDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} +} + +func (_c *MockNPDU_GetData_Call) Run(run func(dlen int)) *MockNPDU_GetData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *MockNPDU_GetData_Call) Return(_a0 []byte, _a1 error) *MockNPDU_GetData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNPDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockNPDU_GetData_Call { + _c.Call.Return(run) + return _c +} + +// GetExpectingReply provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' +type MockNPDU_GetExpectingReply_Call struct { + *mock.Call +} + +// GetExpectingReply is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetExpectingReply() *MockNPDU_GetExpectingReply_Call { + return &MockNPDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} +} + +func (_c *MockNPDU_GetExpectingReply_Call) Run(run func()) *MockNPDU_GetExpectingReply_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetExpectingReply_Call) Return(_a0 bool) *MockNPDU_GetExpectingReply_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockNPDU_GetExpectingReply_Call { + _c.Call.Return(run) + return _c +} + +// GetLong provides a mock function with given fields: +func (_m *MockNPDU) GetLong() (int64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLong") + } + + var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func() (int64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNPDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' +type MockNPDU_GetLong_Call struct { + *mock.Call +} + +// GetLong is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetLong() *MockNPDU_GetLong_Call { + return &MockNPDU_GetLong_Call{Call: _e.mock.On("GetLong")} +} + +func (_c *MockNPDU_GetLong_Call) Run(run func()) *MockNPDU_GetLong_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetLong_Call) Return(_a0 int64, _a1 error) *MockNPDU_GetLong_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNPDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockNPDU_GetLong_Call { + _c.Call.Return(run) + return _c +} + +// GetNPDUNetMessage provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_GetNPDUNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNPDUNetMessage' +type MockNPDU_GetNPDUNetMessage_Call struct { + *mock.Call +} + +// GetNPDUNetMessage is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetNPDUNetMessage() *MockNPDU_GetNPDUNetMessage_Call { + return &MockNPDU_GetNPDUNetMessage_Call{Call: _e.mock.On("GetNPDUNetMessage")} +} + +func (_c *MockNPDU_GetNPDUNetMessage_Call) Run(run func()) *MockNPDU_GetNPDUNetMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetNPDUNetMessage_Call) Return(_a0 *uint8) *MockNPDU_GetNPDUNetMessage_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetNPDUNetMessage_Call) RunAndReturn(run func() *uint8) *MockNPDU_GetNPDUNetMessage_Call { + _c.Call.Return(run) + return _c +} + +// GetNetworkPriority provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' +type MockNPDU_GetNetworkPriority_Call struct { + *mock.Call +} + +// GetNetworkPriority is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetNetworkPriority() *MockNPDU_GetNetworkPriority_Call { + return &MockNPDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} +} + +func (_c *MockNPDU_GetNetworkPriority_Call) Run(run func()) *MockNPDU_GetNetworkPriority_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockNPDU_GetNetworkPriority_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockNPDU_GetNetworkPriority_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUDestination provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' +type MockNPDU_GetPDUDestination_Call struct { + *mock.Call +} + +// GetPDUDestination is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetPDUDestination() *MockNPDU_GetPDUDestination_Call { + return &MockNPDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} +} + +func (_c *MockNPDU_GetPDUDestination_Call) Run(run func()) *MockNPDU_GetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetPDUDestination_Call) Return(_a0 *Address) *MockNPDU_GetPDUDestination_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockNPDU_GetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUSource provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' +type MockNPDU_GetPDUSource_Call struct { + *mock.Call +} + +// GetPDUSource is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetPDUSource() *MockNPDU_GetPDUSource_Call { + return &MockNPDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} +} + +func (_c *MockNPDU_GetPDUSource_Call) Run(run func()) *MockNPDU_GetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetPDUSource_Call) Return(_a0 *Address) *MockNPDU_GetPDUSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockNPDU_GetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUUserData provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' +type MockNPDU_GetPDUUserData_Call struct { + *mock.Call +} + +// GetPDUUserData is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetPDUUserData() *MockNPDU_GetPDUUserData_Call { + return &MockNPDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} +} + +func (_c *MockNPDU_GetPDUUserData_Call) Run(run func()) *MockNPDU_GetPDUUserData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetPDUUserData_Call) Return(_a0 spi.Message) *MockNPDU_GetPDUUserData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockNPDU_GetPDUUserData_Call { + _c.Call.Return(run) + return _c +} + +// GetPduData provides a mock function with given fields: +func (_m *MockNPDU) GetPduData() []byte { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPduData") + } + + 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 +} + +// MockNPDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' +type MockNPDU_GetPduData_Call struct { + *mock.Call +} + +// GetPduData is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetPduData() *MockNPDU_GetPduData_Call { + return &MockNPDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} +} + +func (_c *MockNPDU_GetPduData_Call) Run(run func()) *MockNPDU_GetPduData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetPduData_Call) Return(_a0 []byte) *MockNPDU_GetPduData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_GetPduData_Call) RunAndReturn(run func() []byte) *MockNPDU_GetPduData_Call { + _c.Call.Return(run) + return _c +} + +// GetShort provides a mock function with given fields: +func (_m *MockNPDU) GetShort() (int16, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetShort") + } + + var r0 int16 + var r1 error + if rf, ok := ret.Get(0).(func() (int16, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int16); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int16) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNPDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' +type MockNPDU_GetShort_Call struct { + *mock.Call +} + +// GetShort is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) GetShort() *MockNPDU_GetShort_Call { + return &MockNPDU_GetShort_Call{Call: _e.mock.On("GetShort")} +} + +func (_c *MockNPDU_GetShort_Call) Run(run func()) *MockNPDU_GetShort_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_GetShort_Call) Return(_a0 int16, _a1 error) *MockNPDU_GetShort_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNPDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockNPDU_GetShort_Call { + _c.Call.Return(run) + return _c +} + +// Put provides a mock function with given fields: _a0 +func (_m *MockNPDU) Put(_a0 byte) { + _m.Called(_a0) +} + +// MockNPDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type MockNPDU_Put_Call struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - _a0 byte +func (_e *MockNPDU_Expecter) Put(_a0 interface{}) *MockNPDU_Put_Call { + return &MockNPDU_Put_Call{Call: _e.mock.On("Put", _a0)} +} + +func (_c *MockNPDU_Put_Call) Run(run func(_a0 byte)) *MockNPDU_Put_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(byte)) + }) + return _c +} + +func (_c *MockNPDU_Put_Call) Return() *MockNPDU_Put_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_Put_Call) RunAndReturn(run func(byte)) *MockNPDU_Put_Call { + _c.Call.Return(run) + return _c +} + +// PutData provides a mock function with given fields: _a0 +func (_m *MockNPDU) PutData(_a0 ...byte) { + _va := make([]interface{}, len(_a0)) + for _i := range _a0 { + _va[_i] = _a0[_i] + } + var _ca []interface{} + _ca = append(_ca, _va...) + _m.Called(_ca...) +} + +// MockNPDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' +type MockNPDU_PutData_Call struct { + *mock.Call +} + +// PutData is a helper method to define mock.On call +// - _a0 ...byte +func (_e *MockNPDU_Expecter) PutData(_a0 ...interface{}) *MockNPDU_PutData_Call { + return &MockNPDU_PutData_Call{Call: _e.mock.On("PutData", + append([]interface{}{}, _a0...)...)} +} + +func (_c *MockNPDU_PutData_Call) Run(run func(_a0 ...byte)) *MockNPDU_PutData_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]byte, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(byte) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockNPDU_PutData_Call) Return() *MockNPDU_PutData_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_PutData_Call) RunAndReturn(run func(...byte)) *MockNPDU_PutData_Call { + _c.Call.Return(run) + return _c +} + +// PutLong provides a mock function with given fields: _a0 +func (_m *MockNPDU) PutLong(_a0 int64) { + _m.Called(_a0) +} + +// MockNPDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' +type MockNPDU_PutLong_Call struct { + *mock.Call +} + +// PutLong is a helper method to define mock.On call +// - _a0 int64 +func (_e *MockNPDU_Expecter) PutLong(_a0 interface{}) *MockNPDU_PutLong_Call { + return &MockNPDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} +} + +func (_c *MockNPDU_PutLong_Call) Run(run func(_a0 int64)) *MockNPDU_PutLong_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *MockNPDU_PutLong_Call) Return() *MockNPDU_PutLong_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_PutLong_Call) RunAndReturn(run func(int64)) *MockNPDU_PutLong_Call { + _c.Call.Return(run) + return _c +} + +// PutShort provides a mock function with given fields: _a0 +func (_m *MockNPDU) PutShort(_a0 int16) { + _m.Called(_a0) +} + +// MockNPDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' +type MockNPDU_PutShort_Call struct { + *mock.Call +} + +// PutShort is a helper method to define mock.On call +// - _a0 int16 +func (_e *MockNPDU_Expecter) PutShort(_a0 interface{}) *MockNPDU_PutShort_Call { + return &MockNPDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} +} + +func (_c *MockNPDU_PutShort_Call) Run(run func(_a0 int16)) *MockNPDU_PutShort_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int16)) + }) + return _c +} + +func (_c *MockNPDU_PutShort_Call) Return() *MockNPDU_PutShort_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_PutShort_Call) RunAndReturn(run func(int16)) *MockNPDU_PutShort_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUDestination provides a mock function with given fields: _a0 +func (_m *MockNPDU) SetPDUDestination(_a0 *Address) { + _m.Called(_a0) +} + +// MockNPDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' +type MockNPDU_SetPDUDestination_Call struct { + *mock.Call +} + +// SetPDUDestination is a helper method to define mock.On call +// - _a0 *Address +func (_e *MockNPDU_Expecter) SetPDUDestination(_a0 interface{}) *MockNPDU_SetPDUDestination_Call { + return &MockNPDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} +} + +func (_c *MockNPDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockNPDU_SetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockNPDU_SetPDUDestination_Call) Return() *MockNPDU_SetPDUDestination_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockNPDU_SetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUSource provides a mock function with given fields: source +func (_m *MockNPDU) SetPDUSource(source *Address) { + _m.Called(source) +} + +// MockNPDU_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' +type MockNPDU_SetPDUSource_Call struct { + *mock.Call +} + +// SetPDUSource is a helper method to define mock.On call +// - source *Address +func (_e *MockNPDU_Expecter) SetPDUSource(source interface{}) *MockNPDU_SetPDUSource_Call { + return &MockNPDU_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} +} + +func (_c *MockNPDU_SetPDUSource_Call) Run(run func(source *Address)) *MockNPDU_SetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockNPDU_SetPDUSource_Call) Return() *MockNPDU_SetPDUSource_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockNPDU_SetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// SetPduData provides a mock function with given fields: _a0 +func (_m *MockNPDU) SetPduData(_a0 []byte) { + _m.Called(_a0) +} + +// MockNPDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' +type MockNPDU_SetPduData_Call struct { + *mock.Call +} + +// SetPduData is a helper method to define mock.On call +// - _a0 []byte +func (_e *MockNPDU_Expecter) SetPduData(_a0 interface{}) *MockNPDU_SetPduData_Call { + return &MockNPDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} +} + +func (_c *MockNPDU_SetPduData_Call) Run(run func(_a0 []byte)) *MockNPDU_SetPduData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *MockNPDU_SetPduData_Call) Return() *MockNPDU_SetPduData_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_SetPduData_Call) RunAndReturn(run func([]byte)) *MockNPDU_SetPduData_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockNPDU) 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 +} + +// MockNPDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockNPDU_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockNPDU_Expecter) String() *MockNPDU_String_Call { + return &MockNPDU_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockNPDU_String_Call) Run(run func()) *MockNPDU_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNPDU_String_Call) Return(_a0 string) *MockNPDU_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_String_Call) RunAndReturn(run func() string) *MockNPDU_String_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: pci +func (_m *MockNPDU) 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 +} + +// MockNPDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockNPDU_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - pci Arg +func (_e *MockNPDU_Expecter) Update(pci interface{}) *MockNPDU_Update_Call { + return &MockNPDU_Update_Call{Call: _e.mock.On("Update", pci)} +} + +func (_c *MockNPDU_Update_Call) Run(run func(pci Arg)) *MockNPDU_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockNPDU_Update_Call) Return(_a0 error) *MockNPDU_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNPDU_Update_Call) RunAndReturn(run func(Arg) error) *MockNPDU_Update_Call { + _c.Call.Return(run) + return _c +} + +// setAPDU provides a mock function with given fields: apdu +func (_m *MockNPDU) setAPDU(apdu model.APDU) { + _m.Called(apdu) +} + +// MockNPDU_setAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAPDU' +type MockNPDU_setAPDU_Call struct { + *mock.Call +} + +// setAPDU is a helper method to define mock.On call +// - apdu model.APDU +func (_e *MockNPDU_Expecter) setAPDU(apdu interface{}) *MockNPDU_setAPDU_Call { + return &MockNPDU_setAPDU_Call{Call: _e.mock.On("setAPDU", apdu)} +} + +func (_c *MockNPDU_setAPDU_Call) Run(run func(apdu model.APDU)) *MockNPDU_setAPDU_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.APDU)) + }) + return _c +} + +func (_c *MockNPDU_setAPDU_Call) Return() *MockNPDU_setAPDU_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_setAPDU_Call) RunAndReturn(run func(model.APDU)) *MockNPDU_setAPDU_Call { + _c.Call.Return(run) + return _c +} + +// setNLM provides a mock function with given fields: nlm +func (_m *MockNPDU) setNLM(nlm model.NLM) { + _m.Called(nlm) +} + +// MockNPDU_setNLM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNLM' +type MockNPDU_setNLM_Call struct { + *mock.Call +} + +// setNLM is a helper method to define mock.On call +// - nlm model.NLM +func (_e *MockNPDU_Expecter) setNLM(nlm interface{}) *MockNPDU_setNLM_Call { + return &MockNPDU_setNLM_Call{Call: _e.mock.On("setNLM", nlm)} +} + +func (_c *MockNPDU_setNLM_Call) Run(run func(nlm model.NLM)) *MockNPDU_setNLM_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.NLM)) + }) + return _c +} + +func (_c *MockNPDU_setNLM_Call) Return() *MockNPDU_setNLM_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_setNLM_Call) RunAndReturn(run func(model.NLM)) *MockNPDU_setNLM_Call { + _c.Call.Return(run) + return _c +} + +// setNPDU provides a mock function with given fields: npdu +func (_m *MockNPDU) setNPDU(npdu model.NPDU) { + _m.Called(npdu) +} + +// MockNPDU_setNPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNPDU' +type MockNPDU_setNPDU_Call struct { + *mock.Call +} + +// setNPDU is a helper method to define mock.On call +// - npdu model.NPDU +func (_e *MockNPDU_Expecter) setNPDU(npdu interface{}) *MockNPDU_setNPDU_Call { + return &MockNPDU_setNPDU_Call{Call: _e.mock.On("setNPDU", npdu)} +} + +func (_c *MockNPDU_setNPDU_Call) Run(run func(npdu model.NPDU)) *MockNPDU_setNPDU_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(model.NPDU)) + }) + return _c +} + +func (_c *MockNPDU_setNPDU_Call) Return() *MockNPDU_setNPDU_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNPDU_setNPDU_Call) RunAndReturn(run func(model.NPDU)) *MockNPDU_setNPDU_Call { + _c.Call.Return(run) + return _c +} + +// NewMockNPDU creates a new instance of MockNPDU. 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 NewMockNPDU(t interface { + mock.TestingT + Cleanup(func()) +}) *MockNPDU { + mock := &MockNPDU{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_NetworkNode_test.go b/plc4go/internal/bacnetip/mock_NetworkNode_test.go new file mode 100644 index 00000000000..9a6e9d6d8cf --- /dev/null +++ b/plc4go/internal/bacnetip/mock_NetworkNode_test.go @@ -0,0 +1,346 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockNetworkNode is an autogenerated mock type for the NetworkNode type +type MockNetworkNode struct { + mock.Mock +} + +type MockNetworkNode_Expecter struct { + mock *mock.Mock +} + +func (_m *MockNetworkNode) EXPECT() *MockNetworkNode_Expecter { + return &MockNetworkNode_Expecter{mock: &_m.Mock} +} + +// Response provides a mock function with given fields: args, kwArgs +func (_m *MockNetworkNode) Response(args Args, kwArgs KWArgs) error { + ret := _m.Called(args, kwArgs) + + if len(ret) == 0 { + panic("no return value specified for Response") + } + + var r0 error + if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { + r0 = rf(args, kwArgs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockNetworkNode_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' +type MockNetworkNode_Response_Call struct { + *mock.Call +} + +// Response is a helper method to define mock.On call +// - args Args +// - kwArgs KWArgs +func (_e *MockNetworkNode_Expecter) Response(args interface{}, kwArgs interface{}) *MockNetworkNode_Response_Call { + return &MockNetworkNode_Response_Call{Call: _e.mock.On("Response", args, kwArgs)} +} + +func (_c *MockNetworkNode_Response_Call) Run(run func(args Args, kwArgs KWArgs)) *MockNetworkNode_Response_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Args), args[1].(KWArgs)) + }) + return _c +} + +func (_c *MockNetworkNode_Response_Call) Return(_a0 error) *MockNetworkNode_Response_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNetworkNode_Response_Call) RunAndReturn(run func(Args, KWArgs) error) *MockNetworkNode_Response_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockNetworkNode) 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 +} + +// MockNetworkNode_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockNetworkNode_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockNetworkNode_Expecter) String() *MockNetworkNode_String_Call { + return &MockNetworkNode_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockNetworkNode_String_Call) Run(run func()) *MockNetworkNode_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNetworkNode_String_Call) Return(_a0 string) *MockNetworkNode_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNetworkNode_String_Call) RunAndReturn(run func() string) *MockNetworkNode_String_Call { + _c.Call.Return(run) + return _c +} + +// getAddress provides a mock function with given fields: +func (_m *MockNetworkNode) getAddress() *Address { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getAddress") + } + + 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 +} + +// MockNetworkNode_getAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAddress' +type MockNetworkNode_getAddress_Call struct { + *mock.Call +} + +// getAddress is a helper method to define mock.On call +func (_e *MockNetworkNode_Expecter) getAddress() *MockNetworkNode_getAddress_Call { + return &MockNetworkNode_getAddress_Call{Call: _e.mock.On("getAddress")} +} + +func (_c *MockNetworkNode_getAddress_Call) Run(run func()) *MockNetworkNode_getAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNetworkNode_getAddress_Call) Return(_a0 *Address) *MockNetworkNode_getAddress_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNetworkNode_getAddress_Call) RunAndReturn(run func() *Address) *MockNetworkNode_getAddress_Call { + _c.Call.Return(run) + return _c +} + +// getName provides a mock function with given fields: +func (_m *MockNetworkNode) getName() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getName") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockNetworkNode_getName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getName' +type MockNetworkNode_getName_Call struct { + *mock.Call +} + +// getName is a helper method to define mock.On call +func (_e *MockNetworkNode_Expecter) getName() *MockNetworkNode_getName_Call { + return &MockNetworkNode_getName_Call{Call: _e.mock.On("getName")} +} + +func (_c *MockNetworkNode_getName_Call) Run(run func()) *MockNetworkNode_getName_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNetworkNode_getName_Call) Return(_a0 string) *MockNetworkNode_getName_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNetworkNode_getName_Call) RunAndReturn(run func() string) *MockNetworkNode_getName_Call { + _c.Call.Return(run) + return _c +} + +// isPromiscuous provides a mock function with given fields: +func (_m *MockNetworkNode) isPromiscuous() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for isPromiscuous") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockNetworkNode_isPromiscuous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isPromiscuous' +type MockNetworkNode_isPromiscuous_Call struct { + *mock.Call +} + +// isPromiscuous is a helper method to define mock.On call +func (_e *MockNetworkNode_Expecter) isPromiscuous() *MockNetworkNode_isPromiscuous_Call { + return &MockNetworkNode_isPromiscuous_Call{Call: _e.mock.On("isPromiscuous")} +} + +func (_c *MockNetworkNode_isPromiscuous_Call) Run(run func()) *MockNetworkNode_isPromiscuous_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockNetworkNode_isPromiscuous_Call) Return(_a0 bool) *MockNetworkNode_isPromiscuous_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNetworkNode_isPromiscuous_Call) RunAndReturn(run func() bool) *MockNetworkNode_isPromiscuous_Call { + _c.Call.Return(run) + return _c +} + +// setLan provides a mock function with given fields: lan +func (_m *MockNetworkNode) setLan(lan *Network) { + _m.Called(lan) +} + +// MockNetworkNode_setLan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setLan' +type MockNetworkNode_setLan_Call struct { + *mock.Call +} + +// setLan is a helper method to define mock.On call +// - lan *Network +func (_e *MockNetworkNode_Expecter) setLan(lan interface{}) *MockNetworkNode_setLan_Call { + return &MockNetworkNode_setLan_Call{Call: _e.mock.On("setLan", lan)} +} + +func (_c *MockNetworkNode_setLan_Call) Run(run func(lan *Network)) *MockNetworkNode_setLan_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Network)) + }) + return _c +} + +func (_c *MockNetworkNode_setLan_Call) Return() *MockNetworkNode_setLan_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNetworkNode_setLan_Call) RunAndReturn(run func(*Network)) *MockNetworkNode_setLan_Call { + _c.Call.Return(run) + return _c +} + +// setName provides a mock function with given fields: name +func (_m *MockNetworkNode) setName(name string) { + _m.Called(name) +} + +// MockNetworkNode_setName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setName' +type MockNetworkNode_setName_Call struct { + *mock.Call +} + +// setName is a helper method to define mock.On call +// - name string +func (_e *MockNetworkNode_Expecter) setName(name interface{}) *MockNetworkNode_setName_Call { + return &MockNetworkNode_setName_Call{Call: _e.mock.On("setName", name)} +} + +func (_c *MockNetworkNode_setName_Call) Run(run func(name string)) *MockNetworkNode_setName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockNetworkNode_setName_Call) Return() *MockNetworkNode_setName_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNetworkNode_setName_Call) RunAndReturn(run func(string)) *MockNetworkNode_setName_Call { + _c.Call.Return(run) + return _c +} + +// NewMockNetworkNode creates a new instance of MockNetworkNode. 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 NewMockNetworkNode(t interface { + mock.TestingT + Cleanup(func()) +}) *MockNetworkNode { + mock := &MockNetworkNode{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go b/plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go new file mode 100644 index 00000000000..670a9d64bdd --- /dev/null +++ b/plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go @@ -0,0 +1,130 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockNodeNetworkReference is an autogenerated mock type for the NodeNetworkReference type +type MockNodeNetworkReference struct { + mock.Mock +} + +type MockNodeNetworkReference_Expecter struct { + mock *mock.Mock +} + +func (_m *MockNodeNetworkReference) EXPECT() *MockNodeNetworkReference_Expecter { + return &MockNodeNetworkReference_Expecter{mock: &_m.Mock} +} + +// AddNode provides a mock function with given fields: node +func (_m *MockNodeNetworkReference) AddNode(node NetworkNode) { + _m.Called(node) +} + +// MockNodeNetworkReference_AddNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNode' +type MockNodeNetworkReference_AddNode_Call struct { + *mock.Call +} + +// AddNode is a helper method to define mock.On call +// - node NetworkNode +func (_e *MockNodeNetworkReference_Expecter) AddNode(node interface{}) *MockNodeNetworkReference_AddNode_Call { + return &MockNodeNetworkReference_AddNode_Call{Call: _e.mock.On("AddNode", node)} +} + +func (_c *MockNodeNetworkReference_AddNode_Call) Run(run func(node NetworkNode)) *MockNodeNetworkReference_AddNode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(NetworkNode)) + }) + return _c +} + +func (_c *MockNodeNetworkReference_AddNode_Call) Return() *MockNodeNetworkReference_AddNode_Call { + _c.Call.Return() + return _c +} + +func (_c *MockNodeNetworkReference_AddNode_Call) RunAndReturn(run func(NetworkNode)) *MockNodeNetworkReference_AddNode_Call { + _c.Call.Return(run) + return _c +} + +// ProcessPDU provides a mock function with given fields: pdu +func (_m *MockNodeNetworkReference) ProcessPDU(pdu PDU) error { + ret := _m.Called(pdu) + + if len(ret) == 0 { + panic("no return value specified for ProcessPDU") + } + + var r0 error + if rf, ok := ret.Get(0).(func(PDU) error); ok { + r0 = rf(pdu) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockNodeNetworkReference_ProcessPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessPDU' +type MockNodeNetworkReference_ProcessPDU_Call struct { + *mock.Call +} + +// ProcessPDU is a helper method to define mock.On call +// - pdu PDU +func (_e *MockNodeNetworkReference_Expecter) ProcessPDU(pdu interface{}) *MockNodeNetworkReference_ProcessPDU_Call { + return &MockNodeNetworkReference_ProcessPDU_Call{Call: _e.mock.On("ProcessPDU", pdu)} +} + +func (_c *MockNodeNetworkReference_ProcessPDU_Call) Run(run func(pdu PDU)) *MockNodeNetworkReference_ProcessPDU_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(PDU)) + }) + return _c +} + +func (_c *MockNodeNetworkReference_ProcessPDU_Call) Return(_a0 error) *MockNodeNetworkReference_ProcessPDU_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNodeNetworkReference_ProcessPDU_Call) RunAndReturn(run func(PDU) error) *MockNodeNetworkReference_ProcessPDU_Call { + _c.Call.Return(run) + return _c +} + +// NewMockNodeNetworkReference creates a new instance of MockNodeNetworkReference. 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 NewMockNodeNetworkReference(t interface { + mock.TestingT + Cleanup(func()) +}) *MockNodeNetworkReference { + mock := &MockNodeNetworkReference{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go b/plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go new file mode 100644 index 00000000000..5e5e05f16b7 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go @@ -0,0 +1,211 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockObjectTypeContract is an autogenerated mock type for the ObjectTypeContract type +type MockObjectTypeContract struct { + mock.Mock +} + +type MockObjectTypeContract_Expecter struct { + mock *mock.Mock +} + +func (_m *MockObjectTypeContract) EXPECT() *MockObjectTypeContract_Expecter { + return &MockObjectTypeContract_Expecter{mock: &_m.Mock} +} + +// GetEnumerations provides a mock function with given fields: +func (_m *MockObjectTypeContract) GetEnumerations() map[string]uint64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEnumerations") + } + + var r0 map[string]uint64 + if rf, ok := ret.Get(0).(func() map[string]uint64); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]uint64) + } + } + + return r0 +} + +// MockObjectTypeContract_GetEnumerations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnumerations' +type MockObjectTypeContract_GetEnumerations_Call struct { + *mock.Call +} + +// GetEnumerations is a helper method to define mock.On call +func (_e *MockObjectTypeContract_Expecter) GetEnumerations() *MockObjectTypeContract_GetEnumerations_Call { + return &MockObjectTypeContract_GetEnumerations_Call{Call: _e.mock.On("GetEnumerations")} +} + +func (_c *MockObjectTypeContract_GetEnumerations_Call) Run(run func()) *MockObjectTypeContract_GetEnumerations_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockObjectTypeContract_GetEnumerations_Call) Return(_a0 map[string]uint64) *MockObjectTypeContract_GetEnumerations_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockObjectTypeContract_GetEnumerations_Call) RunAndReturn(run func() map[string]uint64) *MockObjectTypeContract_GetEnumerations_Call { + _c.Call.Return(run) + return _c +} + +// GetXlateTable provides a mock function with given fields: +func (_m *MockObjectTypeContract) GetXlateTable() map[interface{}]interface{} { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetXlateTable") + } + + var r0 map[interface{}]interface{} + if rf, ok := ret.Get(0).(func() map[interface{}]interface{}); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[interface{}]interface{}) + } + } + + return r0 +} + +// MockObjectTypeContract_GetXlateTable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetXlateTable' +type MockObjectTypeContract_GetXlateTable_Call struct { + *mock.Call +} + +// GetXlateTable is a helper method to define mock.On call +func (_e *MockObjectTypeContract_Expecter) GetXlateTable() *MockObjectTypeContract_GetXlateTable_Call { + return &MockObjectTypeContract_GetXlateTable_Call{Call: _e.mock.On("GetXlateTable")} +} + +func (_c *MockObjectTypeContract_GetXlateTable_Call) Run(run func()) *MockObjectTypeContract_GetXlateTable_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockObjectTypeContract_GetXlateTable_Call) Return(_a0 map[interface{}]interface{}) *MockObjectTypeContract_GetXlateTable_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockObjectTypeContract_GetXlateTable_Call) RunAndReturn(run func() map[interface{}]interface{}) *MockObjectTypeContract_GetXlateTable_Call { + _c.Call.Return(run) + return _c +} + +// SetEnumerated provides a mock function with given fields: enumerated +func (_m *MockObjectTypeContract) SetEnumerated(enumerated *Enumerated) { + _m.Called(enumerated) +} + +// MockObjectTypeContract_SetEnumerated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEnumerated' +type MockObjectTypeContract_SetEnumerated_Call struct { + *mock.Call +} + +// SetEnumerated is a helper method to define mock.On call +// - enumerated *Enumerated +func (_e *MockObjectTypeContract_Expecter) SetEnumerated(enumerated interface{}) *MockObjectTypeContract_SetEnumerated_Call { + return &MockObjectTypeContract_SetEnumerated_Call{Call: _e.mock.On("SetEnumerated", enumerated)} +} + +func (_c *MockObjectTypeContract_SetEnumerated_Call) Run(run func(enumerated *Enumerated)) *MockObjectTypeContract_SetEnumerated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Enumerated)) + }) + return _c +} + +func (_c *MockObjectTypeContract_SetEnumerated_Call) Return() *MockObjectTypeContract_SetEnumerated_Call { + _c.Call.Return() + return _c +} + +func (_c *MockObjectTypeContract_SetEnumerated_Call) RunAndReturn(run func(*Enumerated)) *MockObjectTypeContract_SetEnumerated_Call { + _c.Call.Return(run) + return _c +} + +// SetObjectType provides a mock function with given fields: objectType +func (_m *MockObjectTypeContract) SetObjectType(objectType *ObjectType) { + _m.Called(objectType) +} + +// MockObjectTypeContract_SetObjectType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetObjectType' +type MockObjectTypeContract_SetObjectType_Call struct { + *mock.Call +} + +// SetObjectType is a helper method to define mock.On call +// - objectType *ObjectType +func (_e *MockObjectTypeContract_Expecter) SetObjectType(objectType interface{}) *MockObjectTypeContract_SetObjectType_Call { + return &MockObjectTypeContract_SetObjectType_Call{Call: _e.mock.On("SetObjectType", objectType)} +} + +func (_c *MockObjectTypeContract_SetObjectType_Call) Run(run func(objectType *ObjectType)) *MockObjectTypeContract_SetObjectType_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*ObjectType)) + }) + return _c +} + +func (_c *MockObjectTypeContract_SetObjectType_Call) Return() *MockObjectTypeContract_SetObjectType_Call { + _c.Call.Return() + return _c +} + +func (_c *MockObjectTypeContract_SetObjectType_Call) RunAndReturn(run func(*ObjectType)) *MockObjectTypeContract_SetObjectType_Call { + _c.Call.Return(run) + return _c +} + +// NewMockObjectTypeContract creates a new instance of MockObjectTypeContract. 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 NewMockObjectTypeContract(t interface { + mock.TestingT + Cleanup(func()) +}) *MockObjectTypeContract { + mock := &MockObjectTypeContract{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_PCI_test.go b/plc4go/internal/bacnetip/mock_PCI_test.go new file mode 100644 index 00000000000..e4ed32e6969 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_PCI_test.go @@ -0,0 +1,443 @@ +/* + * 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" +) + +// MockPCI is an autogenerated mock type for the PCI type +type MockPCI struct { + mock.Mock +} + +type MockPCI_Expecter struct { + mock *mock.Mock +} + +func (_m *MockPCI) EXPECT() *MockPCI_Expecter { + return &MockPCI_Expecter{mock: &_m.Mock} +} + +// GetExpectingReply provides a mock function with given fields: +func (_m *MockPCI) 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 +} + +// MockPCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' +type MockPCI_GetExpectingReply_Call struct { + *mock.Call +} + +// GetExpectingReply is a helper method to define mock.On call +func (_e *MockPCI_Expecter) GetExpectingReply() *MockPCI_GetExpectingReply_Call { + return &MockPCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} +} + +func (_c *MockPCI_GetExpectingReply_Call) Run(run func()) *MockPCI_GetExpectingReply_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPCI_GetExpectingReply_Call) Return(_a0 bool) *MockPCI_GetExpectingReply_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockPCI_GetExpectingReply_Call { + _c.Call.Return(run) + return _c +} + +// GetNetworkPriority provides a mock function with given fields: +func (_m *MockPCI) 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 +} + +// MockPCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' +type MockPCI_GetNetworkPriority_Call struct { + *mock.Call +} + +// GetNetworkPriority is a helper method to define mock.On call +func (_e *MockPCI_Expecter) GetNetworkPriority() *MockPCI_GetNetworkPriority_Call { + return &MockPCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} +} + +func (_c *MockPCI_GetNetworkPriority_Call) Run(run func()) *MockPCI_GetNetworkPriority_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockPCI_GetNetworkPriority_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockPCI_GetNetworkPriority_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUDestination provides a mock function with given fields: +func (_m *MockPCI) 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 +} + +// MockPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' +type MockPCI_GetPDUDestination_Call struct { + *mock.Call +} + +// GetPDUDestination is a helper method to define mock.On call +func (_e *MockPCI_Expecter) GetPDUDestination() *MockPCI_GetPDUDestination_Call { + return &MockPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} +} + +func (_c *MockPCI_GetPDUDestination_Call) Run(run func()) *MockPCI_GetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockPCI_GetPDUDestination_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockPCI_GetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUSource provides a mock function with given fields: +func (_m *MockPCI) 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 +} + +// MockPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' +type MockPCI_GetPDUSource_Call struct { + *mock.Call +} + +// GetPDUSource is a helper method to define mock.On call +func (_e *MockPCI_Expecter) GetPDUSource() *MockPCI_GetPDUSource_Call { + return &MockPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} +} + +func (_c *MockPCI_GetPDUSource_Call) Run(run func()) *MockPCI_GetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPCI_GetPDUSource_Call) Return(_a0 *Address) *MockPCI_GetPDUSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockPCI_GetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// GetPDUUserData provides a mock function with given fields: +func (_m *MockPCI) 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 +} + +// MockPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' +type MockPCI_GetPDUUserData_Call struct { + *mock.Call +} + +// GetPDUUserData is a helper method to define mock.On call +func (_e *MockPCI_Expecter) GetPDUUserData() *MockPCI_GetPDUUserData_Call { + return &MockPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} +} + +func (_c *MockPCI_GetPDUUserData_Call) Run(run func()) *MockPCI_GetPDUUserData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockPCI_GetPDUUserData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockPCI_GetPDUUserData_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUDestination provides a mock function with given fields: _a0 +func (_m *MockPCI) SetPDUDestination(_a0 *Address) { + _m.Called(_a0) +} + +// MockPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' +type MockPCI_SetPDUDestination_Call struct { + *mock.Call +} + +// SetPDUDestination is a helper method to define mock.On call +// - _a0 *Address +func (_e *MockPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockPCI_SetPDUDestination_Call { + return &MockPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} +} + +func (_c *MockPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockPCI_SetPDUDestination_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockPCI_SetPDUDestination_Call) Return() *MockPCI_SetPDUDestination_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockPCI_SetPDUDestination_Call { + _c.Call.Return(run) + return _c +} + +// SetPDUSource provides a mock function with given fields: source +func (_m *MockPCI) SetPDUSource(source *Address) { + _m.Called(source) +} + +// MockPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' +type MockPCI_SetPDUSource_Call struct { + *mock.Call +} + +// SetPDUSource is a helper method to define mock.On call +// - source *Address +func (_e *MockPCI_Expecter) SetPDUSource(source interface{}) *MockPCI_SetPDUSource_Call { + return &MockPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} +} + +func (_c *MockPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockPCI_SetPDUSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*Address)) + }) + return _c +} + +func (_c *MockPCI_SetPDUSource_Call) Return() *MockPCI_SetPDUSource_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockPCI_SetPDUSource_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockPCI) 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 +} + +// MockPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockPCI_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockPCI_Expecter) String() *MockPCI_String_Call { + return &MockPCI_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockPCI_String_Call) Run(run func()) *MockPCI_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPCI_String_Call) Return(_a0 string) *MockPCI_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_String_Call) RunAndReturn(run func() string) *MockPCI_String_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: pci +func (_m *MockPCI) 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 +} + +// MockPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockPCI_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - pci Arg +func (_e *MockPCI_Expecter) Update(pci interface{}) *MockPCI_Update_Call { + return &MockPCI_Update_Call{Call: _e.mock.On("Update", pci)} +} + +func (_c *MockPCI_Update_Call) Run(run func(pci Arg)) *MockPCI_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockPCI_Update_Call) Return(_a0 error) *MockPCI_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockPCI_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockPCI creates a new instance of MockPCI. 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 NewMockPCI(t interface { + mock.TestingT + Cleanup(func()) +}) *MockPCI { + mock := &MockPCI{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_PDUData_test.go b/plc4go/internal/bacnetip/mock_PDUData_test.go new file mode 100644 index 00000000000..5f212a4a1f5 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_PDUData_test.go @@ -0,0 +1,499 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockPDUData is an autogenerated mock type for the PDUData type +type MockPDUData struct { + mock.Mock +} + +type MockPDUData_Expecter struct { + mock *mock.Mock +} + +func (_m *MockPDUData) EXPECT() *MockPDUData_Expecter { + return &MockPDUData_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function with given fields: +func (_m *MockPDUData) Get() (byte, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 byte + var r1 error + if rf, ok := ret.Get(0).(func() (byte, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() byte); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(byte) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDUData_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockPDUData_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +func (_e *MockPDUData_Expecter) Get() *MockPDUData_Get_Call { + return &MockPDUData_Get_Call{Call: _e.mock.On("Get")} +} + +func (_c *MockPDUData_Get_Call) Run(run func()) *MockPDUData_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDUData_Get_Call) Return(_a0 byte, _a1 error) *MockPDUData_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDUData_Get_Call) RunAndReturn(run func() (byte, error)) *MockPDUData_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetData provides a mock function with given fields: dlen +func (_m *MockPDUData) GetData(dlen int) ([]byte, error) { + ret := _m.Called(dlen) + + if len(ret) == 0 { + panic("no return value specified for GetData") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { + return rf(dlen) + } + if rf, ok := ret.Get(0).(func(int) []byte); ok { + r0 = rf(dlen) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(int) error); ok { + r1 = rf(dlen) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDUData_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' +type MockPDUData_GetData_Call struct { + *mock.Call +} + +// GetData is a helper method to define mock.On call +// - dlen int +func (_e *MockPDUData_Expecter) GetData(dlen interface{}) *MockPDUData_GetData_Call { + return &MockPDUData_GetData_Call{Call: _e.mock.On("GetData", dlen)} +} + +func (_c *MockPDUData_GetData_Call) Run(run func(dlen int)) *MockPDUData_GetData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *MockPDUData_GetData_Call) Return(_a0 []byte, _a1 error) *MockPDUData_GetData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDUData_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockPDUData_GetData_Call { + _c.Call.Return(run) + return _c +} + +// GetLong provides a mock function with given fields: +func (_m *MockPDUData) GetLong() (int64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLong") + } + + var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func() (int64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDUData_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' +type MockPDUData_GetLong_Call struct { + *mock.Call +} + +// GetLong is a helper method to define mock.On call +func (_e *MockPDUData_Expecter) GetLong() *MockPDUData_GetLong_Call { + return &MockPDUData_GetLong_Call{Call: _e.mock.On("GetLong")} +} + +func (_c *MockPDUData_GetLong_Call) Run(run func()) *MockPDUData_GetLong_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDUData_GetLong_Call) Return(_a0 int64, _a1 error) *MockPDUData_GetLong_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDUData_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockPDUData_GetLong_Call { + _c.Call.Return(run) + return _c +} + +// GetPduData provides a mock function with given fields: +func (_m *MockPDUData) GetPduData() []byte { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPduData") + } + + 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 +} + +// MockPDUData_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' +type MockPDUData_GetPduData_Call struct { + *mock.Call +} + +// GetPduData is a helper method to define mock.On call +func (_e *MockPDUData_Expecter) GetPduData() *MockPDUData_GetPduData_Call { + return &MockPDUData_GetPduData_Call{Call: _e.mock.On("GetPduData")} +} + +func (_c *MockPDUData_GetPduData_Call) Run(run func()) *MockPDUData_GetPduData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDUData_GetPduData_Call) Return(_a0 []byte) *MockPDUData_GetPduData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPDUData_GetPduData_Call) RunAndReturn(run func() []byte) *MockPDUData_GetPduData_Call { + _c.Call.Return(run) + return _c +} + +// GetShort provides a mock function with given fields: +func (_m *MockPDUData) GetShort() (int16, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetShort") + } + + var r0 int16 + var r1 error + if rf, ok := ret.Get(0).(func() (int16, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int16); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int16) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDUData_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' +type MockPDUData_GetShort_Call struct { + *mock.Call +} + +// GetShort is a helper method to define mock.On call +func (_e *MockPDUData_Expecter) GetShort() *MockPDUData_GetShort_Call { + return &MockPDUData_GetShort_Call{Call: _e.mock.On("GetShort")} +} + +func (_c *MockPDUData_GetShort_Call) Run(run func()) *MockPDUData_GetShort_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDUData_GetShort_Call) Return(_a0 int16, _a1 error) *MockPDUData_GetShort_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDUData_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockPDUData_GetShort_Call { + _c.Call.Return(run) + return _c +} + +// Put provides a mock function with given fields: _a0 +func (_m *MockPDUData) Put(_a0 byte) { + _m.Called(_a0) +} + +// MockPDUData_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type MockPDUData_Put_Call struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - _a0 byte +func (_e *MockPDUData_Expecter) Put(_a0 interface{}) *MockPDUData_Put_Call { + return &MockPDUData_Put_Call{Call: _e.mock.On("Put", _a0)} +} + +func (_c *MockPDUData_Put_Call) Run(run func(_a0 byte)) *MockPDUData_Put_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(byte)) + }) + return _c +} + +func (_c *MockPDUData_Put_Call) Return() *MockPDUData_Put_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDUData_Put_Call) RunAndReturn(run func(byte)) *MockPDUData_Put_Call { + _c.Call.Return(run) + return _c +} + +// PutData provides a mock function with given fields: _a0 +func (_m *MockPDUData) PutData(_a0 ...byte) { + _va := make([]interface{}, len(_a0)) + for _i := range _a0 { + _va[_i] = _a0[_i] + } + var _ca []interface{} + _ca = append(_ca, _va...) + _m.Called(_ca...) +} + +// MockPDUData_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' +type MockPDUData_PutData_Call struct { + *mock.Call +} + +// PutData is a helper method to define mock.On call +// - _a0 ...byte +func (_e *MockPDUData_Expecter) PutData(_a0 ...interface{}) *MockPDUData_PutData_Call { + return &MockPDUData_PutData_Call{Call: _e.mock.On("PutData", + append([]interface{}{}, _a0...)...)} +} + +func (_c *MockPDUData_PutData_Call) Run(run func(_a0 ...byte)) *MockPDUData_PutData_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]byte, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(byte) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockPDUData_PutData_Call) Return() *MockPDUData_PutData_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDUData_PutData_Call) RunAndReturn(run func(...byte)) *MockPDUData_PutData_Call { + _c.Call.Return(run) + return _c +} + +// PutLong provides a mock function with given fields: _a0 +func (_m *MockPDUData) PutLong(_a0 int64) { + _m.Called(_a0) +} + +// MockPDUData_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' +type MockPDUData_PutLong_Call struct { + *mock.Call +} + +// PutLong is a helper method to define mock.On call +// - _a0 int64 +func (_e *MockPDUData_Expecter) PutLong(_a0 interface{}) *MockPDUData_PutLong_Call { + return &MockPDUData_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} +} + +func (_c *MockPDUData_PutLong_Call) Run(run func(_a0 int64)) *MockPDUData_PutLong_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *MockPDUData_PutLong_Call) Return() *MockPDUData_PutLong_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDUData_PutLong_Call) RunAndReturn(run func(int64)) *MockPDUData_PutLong_Call { + _c.Call.Return(run) + return _c +} + +// PutShort provides a mock function with given fields: _a0 +func (_m *MockPDUData) PutShort(_a0 int16) { + _m.Called(_a0) +} + +// MockPDUData_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' +type MockPDUData_PutShort_Call struct { + *mock.Call +} + +// PutShort is a helper method to define mock.On call +// - _a0 int16 +func (_e *MockPDUData_Expecter) PutShort(_a0 interface{}) *MockPDUData_PutShort_Call { + return &MockPDUData_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} +} + +func (_c *MockPDUData_PutShort_Call) Run(run func(_a0 int16)) *MockPDUData_PutShort_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int16)) + }) + return _c +} + +func (_c *MockPDUData_PutShort_Call) Return() *MockPDUData_PutShort_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDUData_PutShort_Call) RunAndReturn(run func(int16)) *MockPDUData_PutShort_Call { + _c.Call.Return(run) + return _c +} + +// SetPduData provides a mock function with given fields: _a0 +func (_m *MockPDUData) SetPduData(_a0 []byte) { + _m.Called(_a0) +} + +// MockPDUData_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' +type MockPDUData_SetPduData_Call struct { + *mock.Call +} + +// SetPduData is a helper method to define mock.On call +// - _a0 []byte +func (_e *MockPDUData_Expecter) SetPduData(_a0 interface{}) *MockPDUData_SetPduData_Call { + return &MockPDUData_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} +} + +func (_c *MockPDUData_SetPduData_Call) Run(run func(_a0 []byte)) *MockPDUData_SetPduData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *MockPDUData_SetPduData_Call) Return() *MockPDUData_SetPduData_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDUData_SetPduData_Call) RunAndReturn(run func([]byte)) *MockPDUData_SetPduData_Call { + _c.Call.Return(run) + return _c +} + +// NewMockPDUData creates a new instance of MockPDUData. 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 NewMockPDUData(t interface { + mock.TestingT + Cleanup(func()) +}) *MockPDUData { + mock := &MockPDUData{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_PDU_test.go b/plc4go/internal/bacnetip/mock_PDU_test.go index ad5d2ab74f2..0ee17f4701a 100644 --- a/plc4go/internal/bacnetip/mock_PDU_test.go +++ b/plc4go/internal/bacnetip/mock_PDU_test.go @@ -87,6 +87,119 @@ func (_c *MockPDU_DeepCopy_Call) RunAndReturn(run func() PDU) *MockPDU_DeepCopy_ return _c } +// Get provides a mock function with given fields: +func (_m *MockPDU) Get() (byte, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 byte + var r1 error + if rf, ok := ret.Get(0).(func() (byte, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() byte); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(byte) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockPDU_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +func (_e *MockPDU_Expecter) Get() *MockPDU_Get_Call { + return &MockPDU_Get_Call{Call: _e.mock.On("Get")} +} + +func (_c *MockPDU_Get_Call) Run(run func()) *MockPDU_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDU_Get_Call) Return(_a0 byte, _a1 error) *MockPDU_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDU_Get_Call) RunAndReturn(run func() (byte, error)) *MockPDU_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetData provides a mock function with given fields: dlen +func (_m *MockPDU) GetData(dlen int) ([]byte, error) { + ret := _m.Called(dlen) + + if len(ret) == 0 { + panic("no return value specified for GetData") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { + return rf(dlen) + } + if rf, ok := ret.Get(0).(func(int) []byte); ok { + r0 = rf(dlen) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(int) error); ok { + r1 = rf(dlen) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' +type MockPDU_GetData_Call struct { + *mock.Call +} + +// GetData is a helper method to define mock.On call +// - dlen int +func (_e *MockPDU_Expecter) GetData(dlen interface{}) *MockPDU_GetData_Call { + return &MockPDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} +} + +func (_c *MockPDU_GetData_Call) Run(run func(dlen int)) *MockPDU_GetData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *MockPDU_GetData_Call) Return(_a0 []byte, _a1 error) *MockPDU_GetData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockPDU_GetData_Call { + _c.Call.Return(run) + return _c +} + // GetExpectingReply provides a mock function with given fields: func (_m *MockPDU) GetExpectingReply() bool { ret := _m.Called() @@ -132,6 +245,61 @@ func (_c *MockPDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockPDU return _c } +// GetLong provides a mock function with given fields: +func (_m *MockPDU) GetLong() (int64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLong") + } + + var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func() (int64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' +type MockPDU_GetLong_Call struct { + *mock.Call +} + +// GetLong is a helper method to define mock.On call +func (_e *MockPDU_Expecter) GetLong() *MockPDU_GetLong_Call { + return &MockPDU_GetLong_Call{Call: _e.mock.On("GetLong")} +} + +func (_c *MockPDU_GetLong_Call) Run(run func()) *MockPDU_GetLong_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDU_GetLong_Call) Return(_a0 int64, _a1 error) *MockPDU_GetLong_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockPDU_GetLong_Call { + _c.Call.Return(run) + return _c +} + // GetMessage provides a mock function with given fields: func (_m *MockPDU) GetMessage() spi.Message { ret := _m.Called() @@ -318,6 +486,300 @@ func (_c *MockPDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockPDU_ return _c } +// GetPDUUserData provides a mock function with given fields: +func (_m *MockPDU) 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 +} + +// MockPDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' +type MockPDU_GetPDUUserData_Call struct { + *mock.Call +} + +// GetPDUUserData is a helper method to define mock.On call +func (_e *MockPDU_Expecter) GetPDUUserData() *MockPDU_GetPDUUserData_Call { + return &MockPDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} +} + +func (_c *MockPDU_GetPDUUserData_Call) Run(run func()) *MockPDU_GetPDUUserData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDU_GetPDUUserData_Call) Return(_a0 spi.Message) *MockPDU_GetPDUUserData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockPDU_GetPDUUserData_Call { + _c.Call.Return(run) + return _c +} + +// GetPduData provides a mock function with given fields: +func (_m *MockPDU) GetPduData() []byte { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPduData") + } + + 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 +} + +// MockPDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' +type MockPDU_GetPduData_Call struct { + *mock.Call +} + +// GetPduData is a helper method to define mock.On call +func (_e *MockPDU_Expecter) GetPduData() *MockPDU_GetPduData_Call { + return &MockPDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} +} + +func (_c *MockPDU_GetPduData_Call) Run(run func()) *MockPDU_GetPduData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDU_GetPduData_Call) Return(_a0 []byte) *MockPDU_GetPduData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPDU_GetPduData_Call) RunAndReturn(run func() []byte) *MockPDU_GetPduData_Call { + _c.Call.Return(run) + return _c +} + +// GetShort provides a mock function with given fields: +func (_m *MockPDU) GetShort() (int16, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetShort") + } + + var r0 int16 + var r1 error + if rf, ok := ret.Get(0).(func() (int16, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int16); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int16) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockPDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' +type MockPDU_GetShort_Call struct { + *mock.Call +} + +// GetShort is a helper method to define mock.On call +func (_e *MockPDU_Expecter) GetShort() *MockPDU_GetShort_Call { + return &MockPDU_GetShort_Call{Call: _e.mock.On("GetShort")} +} + +func (_c *MockPDU_GetShort_Call) Run(run func()) *MockPDU_GetShort_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockPDU_GetShort_Call) Return(_a0 int16, _a1 error) *MockPDU_GetShort_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockPDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockPDU_GetShort_Call { + _c.Call.Return(run) + return _c +} + +// Put provides a mock function with given fields: _a0 +func (_m *MockPDU) Put(_a0 byte) { + _m.Called(_a0) +} + +// MockPDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type MockPDU_Put_Call struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - _a0 byte +func (_e *MockPDU_Expecter) Put(_a0 interface{}) *MockPDU_Put_Call { + return &MockPDU_Put_Call{Call: _e.mock.On("Put", _a0)} +} + +func (_c *MockPDU_Put_Call) Run(run func(_a0 byte)) *MockPDU_Put_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(byte)) + }) + return _c +} + +func (_c *MockPDU_Put_Call) Return() *MockPDU_Put_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDU_Put_Call) RunAndReturn(run func(byte)) *MockPDU_Put_Call { + _c.Call.Return(run) + return _c +} + +// PutData provides a mock function with given fields: _a0 +func (_m *MockPDU) PutData(_a0 ...byte) { + _va := make([]interface{}, len(_a0)) + for _i := range _a0 { + _va[_i] = _a0[_i] + } + var _ca []interface{} + _ca = append(_ca, _va...) + _m.Called(_ca...) +} + +// MockPDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' +type MockPDU_PutData_Call struct { + *mock.Call +} + +// PutData is a helper method to define mock.On call +// - _a0 ...byte +func (_e *MockPDU_Expecter) PutData(_a0 ...interface{}) *MockPDU_PutData_Call { + return &MockPDU_PutData_Call{Call: _e.mock.On("PutData", + append([]interface{}{}, _a0...)...)} +} + +func (_c *MockPDU_PutData_Call) Run(run func(_a0 ...byte)) *MockPDU_PutData_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]byte, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(byte) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockPDU_PutData_Call) Return() *MockPDU_PutData_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDU_PutData_Call) RunAndReturn(run func(...byte)) *MockPDU_PutData_Call { + _c.Call.Return(run) + return _c +} + +// PutLong provides a mock function with given fields: _a0 +func (_m *MockPDU) PutLong(_a0 int64) { + _m.Called(_a0) +} + +// MockPDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' +type MockPDU_PutLong_Call struct { + *mock.Call +} + +// PutLong is a helper method to define mock.On call +// - _a0 int64 +func (_e *MockPDU_Expecter) PutLong(_a0 interface{}) *MockPDU_PutLong_Call { + return &MockPDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} +} + +func (_c *MockPDU_PutLong_Call) Run(run func(_a0 int64)) *MockPDU_PutLong_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *MockPDU_PutLong_Call) Return() *MockPDU_PutLong_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDU_PutLong_Call) RunAndReturn(run func(int64)) *MockPDU_PutLong_Call { + _c.Call.Return(run) + return _c +} + +// PutShort provides a mock function with given fields: _a0 +func (_m *MockPDU) PutShort(_a0 int16) { + _m.Called(_a0) +} + +// MockPDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' +type MockPDU_PutShort_Call struct { + *mock.Call +} + +// PutShort is a helper method to define mock.On call +// - _a0 int16 +func (_e *MockPDU_Expecter) PutShort(_a0 interface{}) *MockPDU_PutShort_Call { + return &MockPDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} +} + +func (_c *MockPDU_PutShort_Call) Run(run func(_a0 int16)) *MockPDU_PutShort_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int16)) + }) + return _c +} + +func (_c *MockPDU_PutShort_Call) Return() *MockPDU_PutShort_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDU_PutShort_Call) RunAndReturn(run func(int16)) *MockPDU_PutShort_Call { + _c.Call.Return(run) + return _c +} + // SetPDUDestination provides a mock function with given fields: _a0 func (_m *MockPDU) SetPDUDestination(_a0 *Address) { _m.Called(_a0) @@ -384,6 +846,39 @@ func (_c *MockPDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockPDU_S return _c } +// SetPduData provides a mock function with given fields: _a0 +func (_m *MockPDU) SetPduData(_a0 []byte) { + _m.Called(_a0) +} + +// MockPDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' +type MockPDU_SetPduData_Call struct { + *mock.Call +} + +// SetPduData is a helper method to define mock.On call +// - _a0 []byte +func (_e *MockPDU_Expecter) SetPduData(_a0 interface{}) *MockPDU_SetPduData_Call { + return &MockPDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} +} + +func (_c *MockPDU_SetPduData_Call) Run(run func(_a0 []byte)) *MockPDU_SetPduData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *MockPDU_SetPduData_Call) Return() *MockPDU_SetPduData_Call { + _c.Call.Return() + return _c +} + +func (_c *MockPDU_SetPduData_Call) RunAndReturn(run func([]byte)) *MockPDU_SetPduData_Call { + _c.Call.Return(run) + return _c +} + // String provides a mock function with given fields: func (_m *MockPDU) String() string { ret := _m.Called() @@ -429,6 +924,52 @@ func (_c *MockPDU_String_Call) RunAndReturn(run func() string) *MockPDU_String_C return _c } +// Update provides a mock function with given fields: pci +func (_m *MockPDU) 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 +} + +// MockPDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockPDU_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - pci Arg +func (_e *MockPDU_Expecter) Update(pci interface{}) *MockPDU_Update_Call { + return &MockPDU_Update_Call{Call: _e.mock.On("Update", pci)} +} + +func (_c *MockPDU_Update_Call) Run(run func(pci Arg)) *MockPDU_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Arg)) + }) + return _c +} + +func (_c *MockPDU_Update_Call) Return(_a0 error) *MockPDU_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockPDU_Update_Call) RunAndReturn(run func(Arg) error) *MockPDU_Update_Call { + _c.Call.Return(run) + return _c +} + // NewMockPDU creates a new instance of MockPDU. 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 NewMockPDU(t interface { diff --git a/plc4go/internal/bacnetip/mock_Tag_test.go b/plc4go/internal/bacnetip/mock_Tag_test.go new file mode 100644 index 00000000000..faa69010e44 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_Tag_test.go @@ -0,0 +1,497 @@ +/* + * 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 +} diff --git a/plc4go/internal/bacnetip/mock_TaskManager_test.go b/plc4go/internal/bacnetip/mock_TaskManager_test.go new file mode 100644 index 00000000000..53ab3313106 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_TaskManager_test.go @@ -0,0 +1,417 @@ +/* + * 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 ( + time "time" + + mock "github.com/stretchr/testify/mock" +) + +// MockTaskManager is an autogenerated mock type for the TaskManager type +type MockTaskManager struct { + mock.Mock +} + +type MockTaskManager_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTaskManager) EXPECT() *MockTaskManager_Expecter { + return &MockTaskManager_Expecter{mock: &_m.Mock} +} + +// ClearTasks provides a mock function with given fields: +func (_m *MockTaskManager) ClearTasks() { + _m.Called() +} + +// MockTaskManager_ClearTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearTasks' +type MockTaskManager_ClearTasks_Call struct { + *mock.Call +} + +// ClearTasks is a helper method to define mock.On call +func (_e *MockTaskManager_Expecter) ClearTasks() *MockTaskManager_ClearTasks_Call { + return &MockTaskManager_ClearTasks_Call{Call: _e.mock.On("ClearTasks")} +} + +func (_c *MockTaskManager_ClearTasks_Call) Run(run func()) *MockTaskManager_ClearTasks_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTaskManager_ClearTasks_Call) Return() *MockTaskManager_ClearTasks_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTaskManager_ClearTasks_Call) RunAndReturn(run func()) *MockTaskManager_ClearTasks_Call { + _c.Call.Return(run) + return _c +} + +// GetNextTask provides a mock function with given fields: +func (_m *MockTaskManager) GetNextTask() (TaskRequirements, *time.Duration) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNextTask") + } + + var r0 TaskRequirements + var r1 *time.Duration + if rf, ok := ret.Get(0).(func() (TaskRequirements, *time.Duration)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() TaskRequirements); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(TaskRequirements) + } + } + + if rf, ok := ret.Get(1).(func() *time.Duration); ok { + r1 = rf() + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*time.Duration) + } + } + + return r0, r1 +} + +// MockTaskManager_GetNextTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextTask' +type MockTaskManager_GetNextTask_Call struct { + *mock.Call +} + +// GetNextTask is a helper method to define mock.On call +func (_e *MockTaskManager_Expecter) GetNextTask() *MockTaskManager_GetNextTask_Call { + return &MockTaskManager_GetNextTask_Call{Call: _e.mock.On("GetNextTask")} +} + +func (_c *MockTaskManager_GetNextTask_Call) Run(run func()) *MockTaskManager_GetNextTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTaskManager_GetNextTask_Call) Return(_a0 TaskRequirements, _a1 *time.Duration) *MockTaskManager_GetNextTask_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTaskManager_GetNextTask_Call) RunAndReturn(run func() (TaskRequirements, *time.Duration)) *MockTaskManager_GetNextTask_Call { + _c.Call.Return(run) + return _c +} + +// GetTasks provides a mock function with given fields: +func (_m *MockTaskManager) GetTasks() []TaskRequirements { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTasks") + } + + var r0 []TaskRequirements + if rf, ok := ret.Get(0).(func() []TaskRequirements); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]TaskRequirements) + } + } + + return r0 +} + +// MockTaskManager_GetTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTasks' +type MockTaskManager_GetTasks_Call struct { + *mock.Call +} + +// GetTasks is a helper method to define mock.On call +func (_e *MockTaskManager_Expecter) GetTasks() *MockTaskManager_GetTasks_Call { + return &MockTaskManager_GetTasks_Call{Call: _e.mock.On("GetTasks")} +} + +func (_c *MockTaskManager_GetTasks_Call) Run(run func()) *MockTaskManager_GetTasks_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTaskManager_GetTasks_Call) Return(_a0 []TaskRequirements) *MockTaskManager_GetTasks_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTaskManager_GetTasks_Call) RunAndReturn(run func() []TaskRequirements) *MockTaskManager_GetTasks_Call { + _c.Call.Return(run) + return _c +} + +// GetTime provides a mock function with given fields: +func (_m *MockTaskManager) GetTime() time.Time { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTime") + } + + var r0 time.Time + if rf, ok := ret.Get(0).(func() time.Time); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(time.Time) + } + + return r0 +} + +// MockTaskManager_GetTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTime' +type MockTaskManager_GetTime_Call struct { + *mock.Call +} + +// GetTime is a helper method to define mock.On call +func (_e *MockTaskManager_Expecter) GetTime() *MockTaskManager_GetTime_Call { + return &MockTaskManager_GetTime_Call{Call: _e.mock.On("GetTime")} +} + +func (_c *MockTaskManager_GetTime_Call) Run(run func()) *MockTaskManager_GetTime_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTaskManager_GetTime_Call) Return(_a0 time.Time) *MockTaskManager_GetTime_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTaskManager_GetTime_Call) RunAndReturn(run func() time.Time) *MockTaskManager_GetTime_Call { + _c.Call.Return(run) + return _c +} + +// InstallTask provides a mock function with given fields: task +func (_m *MockTaskManager) InstallTask(task TaskRequirements) { + _m.Called(task) +} + +// MockTaskManager_InstallTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallTask' +type MockTaskManager_InstallTask_Call struct { + *mock.Call +} + +// InstallTask is a helper method to define mock.On call +// - task TaskRequirements +func (_e *MockTaskManager_Expecter) InstallTask(task interface{}) *MockTaskManager_InstallTask_Call { + return &MockTaskManager_InstallTask_Call{Call: _e.mock.On("InstallTask", task)} +} + +func (_c *MockTaskManager_InstallTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_InstallTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(TaskRequirements)) + }) + return _c +} + +func (_c *MockTaskManager_InstallTask_Call) Return() *MockTaskManager_InstallTask_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTaskManager_InstallTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_InstallTask_Call { + _c.Call.Return(run) + return _c +} + +// PopTask provides a mock function with given fields: +func (_m *MockTaskManager) PopTask() TaskRequirements { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for PopTask") + } + + var r0 TaskRequirements + if rf, ok := ret.Get(0).(func() TaskRequirements); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(TaskRequirements) + } + } + + return r0 +} + +// MockTaskManager_PopTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopTask' +type MockTaskManager_PopTask_Call struct { + *mock.Call +} + +// PopTask is a helper method to define mock.On call +func (_e *MockTaskManager_Expecter) PopTask() *MockTaskManager_PopTask_Call { + return &MockTaskManager_PopTask_Call{Call: _e.mock.On("PopTask")} +} + +func (_c *MockTaskManager_PopTask_Call) Run(run func()) *MockTaskManager_PopTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTaskManager_PopTask_Call) Return(_a0 TaskRequirements) *MockTaskManager_PopTask_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTaskManager_PopTask_Call) RunAndReturn(run func() TaskRequirements) *MockTaskManager_PopTask_Call { + _c.Call.Return(run) + return _c +} + +// ProcessTask provides a mock function with given fields: task +func (_m *MockTaskManager) ProcessTask(task TaskRequirements) { + _m.Called(task) +} + +// MockTaskManager_ProcessTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessTask' +type MockTaskManager_ProcessTask_Call struct { + *mock.Call +} + +// ProcessTask is a helper method to define mock.On call +// - task TaskRequirements +func (_e *MockTaskManager_Expecter) ProcessTask(task interface{}) *MockTaskManager_ProcessTask_Call { + return &MockTaskManager_ProcessTask_Call{Call: _e.mock.On("ProcessTask", task)} +} + +func (_c *MockTaskManager_ProcessTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_ProcessTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(TaskRequirements)) + }) + return _c +} + +func (_c *MockTaskManager_ProcessTask_Call) Return() *MockTaskManager_ProcessTask_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTaskManager_ProcessTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_ProcessTask_Call { + _c.Call.Return(run) + return _c +} + +// ResumeTask provides a mock function with given fields: task +func (_m *MockTaskManager) ResumeTask(task TaskRequirements) { + _m.Called(task) +} + +// MockTaskManager_ResumeTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeTask' +type MockTaskManager_ResumeTask_Call struct { + *mock.Call +} + +// ResumeTask is a helper method to define mock.On call +// - task TaskRequirements +func (_e *MockTaskManager_Expecter) ResumeTask(task interface{}) *MockTaskManager_ResumeTask_Call { + return &MockTaskManager_ResumeTask_Call{Call: _e.mock.On("ResumeTask", task)} +} + +func (_c *MockTaskManager_ResumeTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_ResumeTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(TaskRequirements)) + }) + return _c +} + +func (_c *MockTaskManager_ResumeTask_Call) Return() *MockTaskManager_ResumeTask_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTaskManager_ResumeTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_ResumeTask_Call { + _c.Call.Return(run) + return _c +} + +// SuspendTask provides a mock function with given fields: task +func (_m *MockTaskManager) SuspendTask(task TaskRequirements) { + _m.Called(task) +} + +// MockTaskManager_SuspendTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuspendTask' +type MockTaskManager_SuspendTask_Call struct { + *mock.Call +} + +// SuspendTask is a helper method to define mock.On call +// - task TaskRequirements +func (_e *MockTaskManager_Expecter) SuspendTask(task interface{}) *MockTaskManager_SuspendTask_Call { + return &MockTaskManager_SuspendTask_Call{Call: _e.mock.On("SuspendTask", task)} +} + +func (_c *MockTaskManager_SuspendTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_SuspendTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(TaskRequirements)) + }) + return _c +} + +func (_c *MockTaskManager_SuspendTask_Call) Return() *MockTaskManager_SuspendTask_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTaskManager_SuspendTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_SuspendTask_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTaskManager creates a new instance of MockTaskManager. 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 NewMockTaskManager(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTaskManager { + mock := &MockTaskManager{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock_TrafficLogger_test.go b/plc4go/internal/bacnetip/mock_TrafficLogger_test.go new file mode 100644 index 00000000000..98126786f72 --- /dev/null +++ b/plc4go/internal/bacnetip/mock_TrafficLogger_test.go @@ -0,0 +1,84 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// MockTrafficLogger is an autogenerated mock type for the TrafficLogger type +type MockTrafficLogger struct { + mock.Mock +} + +type MockTrafficLogger_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTrafficLogger) EXPECT() *MockTrafficLogger_Expecter { + return &MockTrafficLogger_Expecter{mock: &_m.Mock} +} + +// Call provides a mock function with given fields: args +func (_m *MockTrafficLogger) Call(args Args) { + _m.Called(args) +} + +// MockTrafficLogger_Call_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Call' +type MockTrafficLogger_Call_Call struct { + *mock.Call +} + +// Call is a helper method to define mock.On call +// - args Args +func (_e *MockTrafficLogger_Expecter) Call(args interface{}) *MockTrafficLogger_Call_Call { + return &MockTrafficLogger_Call_Call{Call: _e.mock.On("Call", args)} +} + +func (_c *MockTrafficLogger_Call_Call) Run(run func(args Args)) *MockTrafficLogger_Call_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Args)) + }) + return _c +} + +func (_c *MockTrafficLogger_Call_Call) Return() *MockTrafficLogger_Call_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTrafficLogger_Call_Call) RunAndReturn(run func(Args)) *MockTrafficLogger_Call_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTrafficLogger creates a new instance of MockTrafficLogger. 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 NewMockTrafficLogger(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTrafficLogger { + mock := &MockTrafficLogger{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go b/plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go new file mode 100644 index 00000000000..68887b5f549 --- /dev/null +++ b/plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go @@ -0,0 +1,98 @@ +/* + * 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 mock "github.com/stretchr/testify/mock" + +// mock_PDUDataRequirements is an autogenerated mock type for the _PDUDataRequirements type +type mock_PDUDataRequirements struct { + mock.Mock +} + +type mock_PDUDataRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *mock_PDUDataRequirements) EXPECT() *mock_PDUDataRequirements_Expecter { + return &mock_PDUDataRequirements_Expecter{mock: &_m.Mock} +} + +// getPDUData provides a mock function with given fields: +func (_m *mock_PDUDataRequirements) getPDUData() []byte { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getPDUData") + } + + 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 +} + +// mock_PDUDataRequirements_getPDUData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getPDUData' +type mock_PDUDataRequirements_getPDUData_Call struct { + *mock.Call +} + +// getPDUData is a helper method to define mock.On call +func (_e *mock_PDUDataRequirements_Expecter) getPDUData() *mock_PDUDataRequirements_getPDUData_Call { + return &mock_PDUDataRequirements_getPDUData_Call{Call: _e.mock.On("getPDUData")} +} + +func (_c *mock_PDUDataRequirements_getPDUData_Call) Run(run func()) *mock_PDUDataRequirements_getPDUData_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mock_PDUDataRequirements_getPDUData_Call) Return(_a0 []byte) *mock_PDUDataRequirements_getPDUData_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mock_PDUDataRequirements_getPDUData_Call) RunAndReturn(run func() []byte) *mock_PDUDataRequirements_getPDUData_Call { + _c.Call.Return(run) + return _c +} + +// newMock_PDUDataRequirements creates a new instance of mock_PDUDataRequirements. 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 newMock_PDUDataRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *mock_PDUDataRequirements { + mock := &mock_PDUDataRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go b/plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go new file mode 100644 index 00000000000..9b58734fa2e --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go @@ -0,0 +1,219 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockStateInterceptor is an autogenerated mock type for the StateInterceptor type +type MockStateInterceptor struct { + mock.Mock +} + +type MockStateInterceptor_Expecter struct { + mock *mock.Mock +} + +func (_m *MockStateInterceptor) EXPECT() *MockStateInterceptor_Expecter { + return &MockStateInterceptor_Expecter{mock: &_m.Mock} +} + +// AfterReceive provides a mock function with given fields: pdu +func (_m *MockStateInterceptor) AfterReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateInterceptor_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' +type MockStateInterceptor_AfterReceive_Call struct { + *mock.Call +} + +// AfterReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateInterceptor_Expecter) AfterReceive(pdu interface{}) *MockStateInterceptor_AfterReceive_Call { + return &MockStateInterceptor_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} +} + +func (_c *MockStateInterceptor_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_AfterReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateInterceptor_AfterReceive_Call) Return() *MockStateInterceptor_AfterReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateInterceptor_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_AfterReceive_Call { + _c.Call.Return(run) + return _c +} + +// AfterSend provides a mock function with given fields: pdu +func (_m *MockStateInterceptor) AfterSend(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateInterceptor_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' +type MockStateInterceptor_AfterSend_Call struct { + *mock.Call +} + +// AfterSend is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateInterceptor_Expecter) AfterSend(pdu interface{}) *MockStateInterceptor_AfterSend_Call { + return &MockStateInterceptor_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} +} + +func (_c *MockStateInterceptor_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_AfterSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateInterceptor_AfterSend_Call) Return() *MockStateInterceptor_AfterSend_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateInterceptor_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_AfterSend_Call { + _c.Call.Return(run) + return _c +} + +// BeforeReceive provides a mock function with given fields: pdu +func (_m *MockStateInterceptor) BeforeReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateInterceptor_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' +type MockStateInterceptor_BeforeReceive_Call struct { + *mock.Call +} + +// BeforeReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateInterceptor_Expecter) BeforeReceive(pdu interface{}) *MockStateInterceptor_BeforeReceive_Call { + return &MockStateInterceptor_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} +} + +func (_c *MockStateInterceptor_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_BeforeReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateInterceptor_BeforeReceive_Call) Return() *MockStateInterceptor_BeforeReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateInterceptor_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_BeforeReceive_Call { + _c.Call.Return(run) + return _c +} + +// BeforeSend provides a mock function with given fields: pdu +func (_m *MockStateInterceptor) BeforeSend(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateInterceptor_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' +type MockStateInterceptor_BeforeSend_Call struct { + *mock.Call +} + +// BeforeSend is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateInterceptor_Expecter) BeforeSend(pdu interface{}) *MockStateInterceptor_BeforeSend_Call { + return &MockStateInterceptor_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} +} + +func (_c *MockStateInterceptor_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_BeforeSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateInterceptor_BeforeSend_Call) Return() *MockStateInterceptor_BeforeSend_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateInterceptor_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_BeforeSend_Call { + _c.Call.Return(run) + return _c +} + +// UnexpectedReceive provides a mock function with given fields: pdu +func (_m *MockStateInterceptor) UnexpectedReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateInterceptor_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' +type MockStateInterceptor_UnexpectedReceive_Call struct { + *mock.Call +} + +// UnexpectedReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateInterceptor_Expecter) UnexpectedReceive(pdu interface{}) *MockStateInterceptor_UnexpectedReceive_Call { + return &MockStateInterceptor_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} +} + +func (_c *MockStateInterceptor_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_UnexpectedReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateInterceptor_UnexpectedReceive_Call) Return() *MockStateInterceptor_UnexpectedReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateInterceptor_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_UnexpectedReceive_Call { + _c.Call.Return(run) + return _c +} + +// NewMockStateInterceptor creates a new instance of MockStateInterceptor. 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 NewMockStateInterceptor(t interface { + mock.TestingT + Cleanup(func()) +}) *MockStateInterceptor { + mock := &MockStateInterceptor{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go new file mode 100644 index 00000000000..4db3ab9c515 --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go @@ -0,0 +1,101 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockStateMachineRequirements is an autogenerated mock type for the StateMachineRequirements type +type MockStateMachineRequirements struct { + mock.Mock +} + +type MockStateMachineRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockStateMachineRequirements) EXPECT() *MockStateMachineRequirements_Expecter { + return &MockStateMachineRequirements_Expecter{mock: &_m.Mock} +} + +// Send provides a mock function with given fields: args, kwargs +func (_m *MockStateMachineRequirements) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockStateMachineRequirements_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type MockStateMachineRequirements_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockStateMachineRequirements_Expecter) Send(args interface{}, kwargs interface{}) *MockStateMachineRequirements_Send_Call { + return &MockStateMachineRequirements_Send_Call{Call: _e.mock.On("Send", args, kwargs)} +} + +func (_c *MockStateMachineRequirements_Send_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachineRequirements_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockStateMachineRequirements_Send_Call) Return(_a0 error) *MockStateMachineRequirements_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachineRequirements_Send_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachineRequirements_Send_Call { + _c.Call.Return(run) + return _c +} + +// NewMockStateMachineRequirements creates a new instance of MockStateMachineRequirements. 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 NewMockStateMachineRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockStateMachineRequirements { + mock := &MockStateMachineRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_StateMachine_test.go b/plc4go/internal/bacnetip/tests/mock_StateMachine_test.go new file mode 100644 index 00000000000..54fab71755d --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_StateMachine_test.go @@ -0,0 +1,1092 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockStateMachine is an autogenerated mock type for the StateMachine type +type MockStateMachine struct { + mock.Mock +} + +type MockStateMachine_Expecter struct { + mock *mock.Mock +} + +func (_m *MockStateMachine) EXPECT() *MockStateMachine_Expecter { + return &MockStateMachine_Expecter{mock: &_m.Mock} +} + +// AfterReceive provides a mock function with given fields: pdu +func (_m *MockStateMachine) AfterReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateMachine_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' +type MockStateMachine_AfterReceive_Call struct { + *mock.Call +} + +// AfterReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateMachine_Expecter) AfterReceive(pdu interface{}) *MockStateMachine_AfterReceive_Call { + return &MockStateMachine_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} +} + +func (_c *MockStateMachine_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_AfterReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateMachine_AfterReceive_Call) Return() *MockStateMachine_AfterReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_AfterReceive_Call { + _c.Call.Return(run) + return _c +} + +// AfterSend provides a mock function with given fields: pdu +func (_m *MockStateMachine) AfterSend(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateMachine_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' +type MockStateMachine_AfterSend_Call struct { + *mock.Call +} + +// AfterSend is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateMachine_Expecter) AfterSend(pdu interface{}) *MockStateMachine_AfterSend_Call { + return &MockStateMachine_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} +} + +func (_c *MockStateMachine_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_AfterSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateMachine_AfterSend_Call) Return() *MockStateMachine_AfterSend_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_AfterSend_Call { + _c.Call.Return(run) + return _c +} + +// BeforeReceive provides a mock function with given fields: pdu +func (_m *MockStateMachine) BeforeReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateMachine_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' +type MockStateMachine_BeforeReceive_Call struct { + *mock.Call +} + +// BeforeReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateMachine_Expecter) BeforeReceive(pdu interface{}) *MockStateMachine_BeforeReceive_Call { + return &MockStateMachine_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} +} + +func (_c *MockStateMachine_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_BeforeReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateMachine_BeforeReceive_Call) Return() *MockStateMachine_BeforeReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_BeforeReceive_Call { + _c.Call.Return(run) + return _c +} + +// BeforeSend provides a mock function with given fields: pdu +func (_m *MockStateMachine) BeforeSend(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateMachine_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' +type MockStateMachine_BeforeSend_Call struct { + *mock.Call +} + +// BeforeSend is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateMachine_Expecter) BeforeSend(pdu interface{}) *MockStateMachine_BeforeSend_Call { + return &MockStateMachine_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} +} + +func (_c *MockStateMachine_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_BeforeSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateMachine_BeforeSend_Call) Return() *MockStateMachine_BeforeSend_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_BeforeSend_Call { + _c.Call.Return(run) + return _c +} + +// EventSet provides a mock function with given fields: id +func (_m *MockStateMachine) EventSet(id string) { + _m.Called(id) +} + +// MockStateMachine_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' +type MockStateMachine_EventSet_Call struct { + *mock.Call +} + +// EventSet is a helper method to define mock.On call +// - id string +func (_e *MockStateMachine_Expecter) EventSet(id interface{}) *MockStateMachine_EventSet_Call { + return &MockStateMachine_EventSet_Call{Call: _e.mock.On("EventSet", id)} +} + +func (_c *MockStateMachine_EventSet_Call) Run(run func(id string)) *MockStateMachine_EventSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockStateMachine_EventSet_Call) Return() *MockStateMachine_EventSet_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_EventSet_Call) RunAndReturn(run func(string)) *MockStateMachine_EventSet_Call { + _c.Call.Return(run) + return _c +} + +// GetCurrentState provides a mock function with given fields: +func (_m *MockStateMachine) GetCurrentState() State { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetCurrentState") + } + + var r0 State + if rf, ok := ret.Get(0).(func() State); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockStateMachine_GetCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentState' +type MockStateMachine_GetCurrentState_Call struct { + *mock.Call +} + +// GetCurrentState is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) GetCurrentState() *MockStateMachine_GetCurrentState_Call { + return &MockStateMachine_GetCurrentState_Call{Call: _e.mock.On("GetCurrentState")} +} + +func (_c *MockStateMachine_GetCurrentState_Call) Run(run func()) *MockStateMachine_GetCurrentState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_GetCurrentState_Call) Return(_a0 State) *MockStateMachine_GetCurrentState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_GetCurrentState_Call) RunAndReturn(run func() State) *MockStateMachine_GetCurrentState_Call { + _c.Call.Return(run) + return _c +} + +// GetStartState provides a mock function with given fields: +func (_m *MockStateMachine) GetStartState() State { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetStartState") + } + + var r0 State + if rf, ok := ret.Get(0).(func() State); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockStateMachine_GetStartState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStartState' +type MockStateMachine_GetStartState_Call struct { + *mock.Call +} + +// GetStartState is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) GetStartState() *MockStateMachine_GetStartState_Call { + return &MockStateMachine_GetStartState_Call{Call: _e.mock.On("GetStartState")} +} + +func (_c *MockStateMachine_GetStartState_Call) Run(run func()) *MockStateMachine_GetStartState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_GetStartState_Call) Return(_a0 State) *MockStateMachine_GetStartState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_GetStartState_Call) RunAndReturn(run func() State) *MockStateMachine_GetStartState_Call { + _c.Call.Return(run) + return _c +} + +// GetTransactionLog provides a mock function with given fields: +func (_m *MockStateMachine) GetTransactionLog() []string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTransactionLog") + } + + var r0 []string + if rf, ok := ret.Get(0).(func() []string); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + return r0 +} + +// MockStateMachine_GetTransactionLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionLog' +type MockStateMachine_GetTransactionLog_Call struct { + *mock.Call +} + +// GetTransactionLog is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) GetTransactionLog() *MockStateMachine_GetTransactionLog_Call { + return &MockStateMachine_GetTransactionLog_Call{Call: _e.mock.On("GetTransactionLog")} +} + +func (_c *MockStateMachine_GetTransactionLog_Call) Run(run func()) *MockStateMachine_GetTransactionLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_GetTransactionLog_Call) Return(_a0 []string) *MockStateMachine_GetTransactionLog_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_GetTransactionLog_Call) RunAndReturn(run func() []string) *MockStateMachine_GetTransactionLog_Call { + _c.Call.Return(run) + return _c +} + +// GetUnexpectedReceiveState provides a mock function with given fields: +func (_m *MockStateMachine) GetUnexpectedReceiveState() State { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetUnexpectedReceiveState") + } + + var r0 State + if rf, ok := ret.Get(0).(func() State); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockStateMachine_GetUnexpectedReceiveState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnexpectedReceiveState' +type MockStateMachine_GetUnexpectedReceiveState_Call struct { + *mock.Call +} + +// GetUnexpectedReceiveState is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) GetUnexpectedReceiveState() *MockStateMachine_GetUnexpectedReceiveState_Call { + return &MockStateMachine_GetUnexpectedReceiveState_Call{Call: _e.mock.On("GetUnexpectedReceiveState")} +} + +func (_c *MockStateMachine_GetUnexpectedReceiveState_Call) Run(run func()) *MockStateMachine_GetUnexpectedReceiveState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_GetUnexpectedReceiveState_Call) Return(_a0 State) *MockStateMachine_GetUnexpectedReceiveState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_GetUnexpectedReceiveState_Call) RunAndReturn(run func() State) *MockStateMachine_GetUnexpectedReceiveState_Call { + _c.Call.Return(run) + return _c +} + +// IsFailState provides a mock function with given fields: +func (_m *MockStateMachine) IsFailState() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsFailState") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockStateMachine_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' +type MockStateMachine_IsFailState_Call struct { + *mock.Call +} + +// IsFailState is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) IsFailState() *MockStateMachine_IsFailState_Call { + return &MockStateMachine_IsFailState_Call{Call: _e.mock.On("IsFailState")} +} + +func (_c *MockStateMachine_IsFailState_Call) Run(run func()) *MockStateMachine_IsFailState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_IsFailState_Call) Return(_a0 bool) *MockStateMachine_IsFailState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_IsFailState_Call) RunAndReturn(run func() bool) *MockStateMachine_IsFailState_Call { + _c.Call.Return(run) + return _c +} + +// IsRunning provides a mock function with given fields: +func (_m *MockStateMachine) IsRunning() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsRunning") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockStateMachine_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' +type MockStateMachine_IsRunning_Call struct { + *mock.Call +} + +// IsRunning is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) IsRunning() *MockStateMachine_IsRunning_Call { + return &MockStateMachine_IsRunning_Call{Call: _e.mock.On("IsRunning")} +} + +func (_c *MockStateMachine_IsRunning_Call) Run(run func()) *MockStateMachine_IsRunning_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_IsRunning_Call) Return(_a0 bool) *MockStateMachine_IsRunning_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_IsRunning_Call) RunAndReturn(run func() bool) *MockStateMachine_IsRunning_Call { + _c.Call.Return(run) + return _c +} + +// IsSuccessState provides a mock function with given fields: +func (_m *MockStateMachine) IsSuccessState() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsSuccessState") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockStateMachine_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' +type MockStateMachine_IsSuccessState_Call struct { + *mock.Call +} + +// IsSuccessState is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) IsSuccessState() *MockStateMachine_IsSuccessState_Call { + return &MockStateMachine_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} +} + +func (_c *MockStateMachine_IsSuccessState_Call) Run(run func()) *MockStateMachine_IsSuccessState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_IsSuccessState_Call) Return(_a0 bool) *MockStateMachine_IsSuccessState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_IsSuccessState_Call) RunAndReturn(run func() bool) *MockStateMachine_IsSuccessState_Call { + _c.Call.Return(run) + return _c +} + +// NewState provides a mock function with given fields: _a0 +func (_m *MockStateMachine) NewState(_a0 string) State { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for NewState") + } + + var r0 State + if rf, ok := ret.Get(0).(func(string) State); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockStateMachine_NewState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewState' +type MockStateMachine_NewState_Call struct { + *mock.Call +} + +// NewState is a helper method to define mock.On call +// - _a0 string +func (_e *MockStateMachine_Expecter) NewState(_a0 interface{}) *MockStateMachine_NewState_Call { + return &MockStateMachine_NewState_Call{Call: _e.mock.On("NewState", _a0)} +} + +func (_c *MockStateMachine_NewState_Call) Run(run func(_a0 string)) *MockStateMachine_NewState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockStateMachine_NewState_Call) Return(_a0 State) *MockStateMachine_NewState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_NewState_Call) RunAndReturn(run func(string) State) *MockStateMachine_NewState_Call { + _c.Call.Return(run) + return _c +} + +// Receive provides a mock function with given fields: args, kwargs +func (_m *MockStateMachine) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Receive") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockStateMachine_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' +type MockStateMachine_Receive_Call struct { + *mock.Call +} + +// Receive is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockStateMachine_Expecter) Receive(args interface{}, kwargs interface{}) *MockStateMachine_Receive_Call { + return &MockStateMachine_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} +} + +func (_c *MockStateMachine_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachine_Receive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockStateMachine_Receive_Call) Return(_a0 error) *MockStateMachine_Receive_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachine_Receive_Call { + _c.Call.Return(run) + return _c +} + +// Reset provides a mock function with given fields: +func (_m *MockStateMachine) Reset() { + _m.Called() +} + +// MockStateMachine_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' +type MockStateMachine_Reset_Call struct { + *mock.Call +} + +// Reset is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) Reset() *MockStateMachine_Reset_Call { + return &MockStateMachine_Reset_Call{Call: _e.mock.On("Reset")} +} + +func (_c *MockStateMachine_Reset_Call) Run(run func()) *MockStateMachine_Reset_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_Reset_Call) Return() *MockStateMachine_Reset_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_Reset_Call) RunAndReturn(run func()) *MockStateMachine_Reset_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: +func (_m *MockStateMachine) Run() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Run") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockStateMachine_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type MockStateMachine_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) Run() *MockStateMachine_Run_Call { + return &MockStateMachine_Run_Call{Call: _e.mock.On("Run")} +} + +func (_c *MockStateMachine_Run_Call) Run(run func()) *MockStateMachine_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_Run_Call) Return(_a0 error) *MockStateMachine_Run_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_Run_Call) RunAndReturn(run func() error) *MockStateMachine_Run_Call { + _c.Call.Return(run) + return _c +} + +// Send provides a mock function with given fields: args, kwargs +func (_m *MockStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockStateMachine_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type MockStateMachine_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockStateMachine_Expecter) Send(args interface{}, kwargs interface{}) *MockStateMachine_Send_Call { + return &MockStateMachine_Send_Call{Call: _e.mock.On("Send", args, kwargs)} +} + +func (_c *MockStateMachine_Send_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachine_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockStateMachine_Send_Call) Return(_a0 error) *MockStateMachine_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_Send_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachine_Send_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockStateMachine) 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 +} + +// MockStateMachine_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockStateMachine_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) String() *MockStateMachine_String_Call { + return &MockStateMachine_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockStateMachine_String_Call) Run(run func()) *MockStateMachine_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_String_Call) Return(_a0 string) *MockStateMachine_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_String_Call) RunAndReturn(run func() string) *MockStateMachine_String_Call { + _c.Call.Return(run) + return _c +} + +// UnexpectedReceive provides a mock function with given fields: pdu +func (_m *MockStateMachine) UnexpectedReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockStateMachine_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' +type MockStateMachine_UnexpectedReceive_Call struct { + *mock.Call +} + +// UnexpectedReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockStateMachine_Expecter) UnexpectedReceive(pdu interface{}) *MockStateMachine_UnexpectedReceive_Call { + return &MockStateMachine_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} +} + +func (_c *MockStateMachine_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_UnexpectedReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockStateMachine_UnexpectedReceive_Call) Return() *MockStateMachine_UnexpectedReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_UnexpectedReceive_Call { + _c.Call.Return(run) + return _c +} + +// getCurrentState provides a mock function with given fields: +func (_m *MockStateMachine) getCurrentState() State { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getCurrentState") + } + + var r0 State + if rf, ok := ret.Get(0).(func() State); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockStateMachine_getCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCurrentState' +type MockStateMachine_getCurrentState_Call struct { + *mock.Call +} + +// getCurrentState is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) getCurrentState() *MockStateMachine_getCurrentState_Call { + return &MockStateMachine_getCurrentState_Call{Call: _e.mock.On("getCurrentState")} +} + +func (_c *MockStateMachine_getCurrentState_Call) Run(run func()) *MockStateMachine_getCurrentState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_getCurrentState_Call) Return(_a0 State) *MockStateMachine_getCurrentState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_getCurrentState_Call) RunAndReturn(run func() State) *MockStateMachine_getCurrentState_Call { + _c.Call.Return(run) + return _c +} + +// getMachineGroup provides a mock function with given fields: +func (_m *MockStateMachine) getMachineGroup() *StateMachineGroup { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getMachineGroup") + } + + var r0 *StateMachineGroup + if rf, ok := ret.Get(0).(func() *StateMachineGroup); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*StateMachineGroup) + } + } + + return r0 +} + +// MockStateMachine_getMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMachineGroup' +type MockStateMachine_getMachineGroup_Call struct { + *mock.Call +} + +// getMachineGroup is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) getMachineGroup() *MockStateMachine_getMachineGroup_Call { + return &MockStateMachine_getMachineGroup_Call{Call: _e.mock.On("getMachineGroup")} +} + +func (_c *MockStateMachine_getMachineGroup_Call) Run(run func()) *MockStateMachine_getMachineGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_getMachineGroup_Call) Return(_a0 *StateMachineGroup) *MockStateMachine_getMachineGroup_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_getMachineGroup_Call) RunAndReturn(run func() *StateMachineGroup) *MockStateMachine_getMachineGroup_Call { + _c.Call.Return(run) + return _c +} + +// getStateTimeoutTask provides a mock function with given fields: +func (_m *MockStateMachine) getStateTimeoutTask() *TimeoutTask { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getStateTimeoutTask") + } + + var r0 *TimeoutTask + if rf, ok := ret.Get(0).(func() *TimeoutTask); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*TimeoutTask) + } + } + + return r0 +} + +// MockStateMachine_getStateTimeoutTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateTimeoutTask' +type MockStateMachine_getStateTimeoutTask_Call struct { + *mock.Call +} + +// getStateTimeoutTask is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) getStateTimeoutTask() *MockStateMachine_getStateTimeoutTask_Call { + return &MockStateMachine_getStateTimeoutTask_Call{Call: _e.mock.On("getStateTimeoutTask")} +} + +func (_c *MockStateMachine_getStateTimeoutTask_Call) Run(run func()) *MockStateMachine_getStateTimeoutTask_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_getStateTimeoutTask_Call) Return(_a0 *TimeoutTask) *MockStateMachine_getStateTimeoutTask_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_getStateTimeoutTask_Call) RunAndReturn(run func() *TimeoutTask) *MockStateMachine_getStateTimeoutTask_Call { + _c.Call.Return(run) + return _c +} + +// getStates provides a mock function with given fields: +func (_m *MockStateMachine) getStates() []State { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getStates") + } + + var r0 []State + if rf, ok := ret.Get(0).(func() []State); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]State) + } + } + + return r0 +} + +// MockStateMachine_getStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStates' +type MockStateMachine_getStates_Call struct { + *mock.Call +} + +// getStates is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) getStates() *MockStateMachine_getStates_Call { + return &MockStateMachine_getStates_Call{Call: _e.mock.On("getStates")} +} + +func (_c *MockStateMachine_getStates_Call) Run(run func()) *MockStateMachine_getStates_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_getStates_Call) Return(_a0 []State) *MockStateMachine_getStates_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockStateMachine_getStates_Call) RunAndReturn(run func() []State) *MockStateMachine_getStates_Call { + _c.Call.Return(run) + return _c +} + +// halt provides a mock function with given fields: +func (_m *MockStateMachine) halt() { + _m.Called() +} + +// MockStateMachine_halt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'halt' +type MockStateMachine_halt_Call struct { + *mock.Call +} + +// halt is a helper method to define mock.On call +func (_e *MockStateMachine_Expecter) halt() *MockStateMachine_halt_Call { + return &MockStateMachine_halt_Call{Call: _e.mock.On("halt")} +} + +func (_c *MockStateMachine_halt_Call) Run(run func()) *MockStateMachine_halt_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockStateMachine_halt_Call) Return() *MockStateMachine_halt_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_halt_Call) RunAndReturn(run func()) *MockStateMachine_halt_Call { + _c.Call.Return(run) + return _c +} + +// setMachineGroup provides a mock function with given fields: machineGroup +func (_m *MockStateMachine) setMachineGroup(machineGroup *StateMachineGroup) { + _m.Called(machineGroup) +} + +// MockStateMachine_setMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setMachineGroup' +type MockStateMachine_setMachineGroup_Call struct { + *mock.Call +} + +// setMachineGroup is a helper method to define mock.On call +// - machineGroup *StateMachineGroup +func (_e *MockStateMachine_Expecter) setMachineGroup(machineGroup interface{}) *MockStateMachine_setMachineGroup_Call { + return &MockStateMachine_setMachineGroup_Call{Call: _e.mock.On("setMachineGroup", machineGroup)} +} + +func (_c *MockStateMachine_setMachineGroup_Call) Run(run func(machineGroup *StateMachineGroup)) *MockStateMachine_setMachineGroup_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*StateMachineGroup)) + }) + return _c +} + +func (_c *MockStateMachine_setMachineGroup_Call) Return() *MockStateMachine_setMachineGroup_Call { + _c.Call.Return() + return _c +} + +func (_c *MockStateMachine_setMachineGroup_Call) RunAndReturn(run func(*StateMachineGroup)) *MockStateMachine_setMachineGroup_Call { + _c.Call.Return(run) + return _c +} + +// NewMockStateMachine creates a new instance of MockStateMachine. 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 NewMockStateMachine(t interface { + mock.TestingT + Cleanup(func()) +}) *MockStateMachine { + mock := &MockStateMachine{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_State_test.go b/plc4go/internal/bacnetip/tests/mock_State_test.go new file mode 100644 index 00000000000..4bb3cfecaf2 --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_State_test.go @@ -0,0 +1,1350 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" + + time "time" +) + +// MockState is an autogenerated mock type for the State type +type MockState struct { + mock.Mock +} + +type MockState_Expecter struct { + mock *mock.Mock +} + +func (_m *MockState) EXPECT() *MockState_Expecter { + return &MockState_Expecter{mock: &_m.Mock} +} + +// Call provides a mock function with given fields: fn, args, kwargs +func (_m *MockState) Call(fn func(bacnetip.Args, bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs) State { + ret := _m.Called(fn, args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Call") + } + + var r0 State + if rf, ok := ret.Get(0).(func(func(bacnetip.Args, bacnetip.KWArgs) error, bacnetip.Args, bacnetip.KWArgs) State); ok { + r0 = rf(fn, args, kwargs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Call_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Call' +type MockState_Call_Call struct { + *mock.Call +} + +// Call is a helper method to define mock.On call +// - fn func(bacnetip.Args , bacnetip.KWArgs) error +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockState_Expecter) Call(fn interface{}, args interface{}, kwargs interface{}) *MockState_Call_Call { + return &MockState_Call_Call{Call: _e.mock.On("Call", fn, args, kwargs)} +} + +func (_c *MockState_Call_Call) Run(run func(fn func(bacnetip.Args, bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockState_Call_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func(bacnetip.Args, bacnetip.KWArgs) error), args[1].(bacnetip.Args), args[2].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockState_Call_Call) Return(_a0 State) *MockState_Call_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Call_Call) RunAndReturn(run func(func(bacnetip.Args, bacnetip.KWArgs) error, bacnetip.Args, bacnetip.KWArgs) State) *MockState_Call_Call { + _c.Call.Return(run) + return _c +} + +// Doc provides a mock function with given fields: docstring +func (_m *MockState) Doc(docstring string) State { + ret := _m.Called(docstring) + + if len(ret) == 0 { + panic("no return value specified for Doc") + } + + var r0 State + if rf, ok := ret.Get(0).(func(string) State); ok { + r0 = rf(docstring) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Doc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Doc' +type MockState_Doc_Call struct { + *mock.Call +} + +// Doc is a helper method to define mock.On call +// - docstring string +func (_e *MockState_Expecter) Doc(docstring interface{}) *MockState_Doc_Call { + return &MockState_Doc_Call{Call: _e.mock.On("Doc", docstring)} +} + +func (_c *MockState_Doc_Call) Run(run func(docstring string)) *MockState_Doc_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockState_Doc_Call) Return(_a0 State) *MockState_Doc_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Doc_Call) RunAndReturn(run func(string) State) *MockState_Doc_Call { + _c.Call.Return(run) + return _c +} + +// DocString provides a mock function with given fields: +func (_m *MockState) DocString() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for DocString") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockState_DocString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DocString' +type MockState_DocString_Call struct { + *mock.Call +} + +// DocString is a helper method to define mock.On call +func (_e *MockState_Expecter) DocString() *MockState_DocString_Call { + return &MockState_DocString_Call{Call: _e.mock.On("DocString")} +} + +func (_c *MockState_DocString_Call) Run(run func()) *MockState_DocString_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_DocString_Call) Return(_a0 string) *MockState_DocString_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_DocString_Call) RunAndReturn(run func() string) *MockState_DocString_Call { + _c.Call.Return(run) + return _c +} + +// EnterState provides a mock function with given fields: +func (_m *MockState) EnterState() { + _m.Called() +} + +// MockState_EnterState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnterState' +type MockState_EnterState_Call struct { + *mock.Call +} + +// EnterState is a helper method to define mock.On call +func (_e *MockState_Expecter) EnterState() *MockState_EnterState_Call { + return &MockState_EnterState_Call{Call: _e.mock.On("EnterState")} +} + +func (_c *MockState_EnterState_Call) Run(run func()) *MockState_EnterState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_EnterState_Call) Return() *MockState_EnterState_Call { + _c.Call.Return() + return _c +} + +func (_c *MockState_EnterState_Call) RunAndReturn(run func()) *MockState_EnterState_Call { + _c.Call.Return(run) + return _c +} + +// Equals provides a mock function with given fields: other +func (_m *MockState) Equals(other State) bool { + ret := _m.Called(other) + + if len(ret) == 0 { + panic("no return value specified for Equals") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(State) bool); ok { + r0 = rf(other) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockState_Equals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equals' +type MockState_Equals_Call struct { + *mock.Call +} + +// Equals is a helper method to define mock.On call +// - other State +func (_e *MockState_Expecter) Equals(other interface{}) *MockState_Equals_Call { + return &MockState_Equals_Call{Call: _e.mock.On("Equals", other)} +} + +func (_c *MockState_Equals_Call) Run(run func(other State)) *MockState_Equals_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(State)) + }) + return _c +} + +func (_c *MockState_Equals_Call) Return(_a0 bool) *MockState_Equals_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Equals_Call) RunAndReturn(run func(State) bool) *MockState_Equals_Call { + _c.Call.Return(run) + return _c +} + +// EventSet provides a mock function with given fields: eventId +func (_m *MockState) EventSet(eventId string) { + _m.Called(eventId) +} + +// MockState_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' +type MockState_EventSet_Call struct { + *mock.Call +} + +// EventSet is a helper method to define mock.On call +// - eventId string +func (_e *MockState_Expecter) EventSet(eventId interface{}) *MockState_EventSet_Call { + return &MockState_EventSet_Call{Call: _e.mock.On("EventSet", eventId)} +} + +func (_c *MockState_EventSet_Call) Run(run func(eventId string)) *MockState_EventSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockState_EventSet_Call) Return() *MockState_EventSet_Call { + _c.Call.Return() + return _c +} + +func (_c *MockState_EventSet_Call) RunAndReturn(run func(string)) *MockState_EventSet_Call { + _c.Call.Return(run) + return _c +} + +// ExitState provides a mock function with given fields: +func (_m *MockState) ExitState() { + _m.Called() +} + +// MockState_ExitState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExitState' +type MockState_ExitState_Call struct { + *mock.Call +} + +// ExitState is a helper method to define mock.On call +func (_e *MockState_Expecter) ExitState() *MockState_ExitState_Call { + return &MockState_ExitState_Call{Call: _e.mock.On("ExitState")} +} + +func (_c *MockState_ExitState_Call) Run(run func()) *MockState_ExitState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_ExitState_Call) Return() *MockState_ExitState_Call { + _c.Call.Return() + return _c +} + +func (_c *MockState_ExitState_Call) RunAndReturn(run func()) *MockState_ExitState_Call { + _c.Call.Return(run) + return _c +} + +// Fail provides a mock function with given fields: docstring +func (_m *MockState) Fail(docstring string) State { + ret := _m.Called(docstring) + + if len(ret) == 0 { + panic("no return value specified for Fail") + } + + var r0 State + if rf, ok := ret.Get(0).(func(string) State); ok { + r0 = rf(docstring) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Fail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fail' +type MockState_Fail_Call struct { + *mock.Call +} + +// Fail is a helper method to define mock.On call +// - docstring string +func (_e *MockState_Expecter) Fail(docstring interface{}) *MockState_Fail_Call { + return &MockState_Fail_Call{Call: _e.mock.On("Fail", docstring)} +} + +func (_c *MockState_Fail_Call) Run(run func(docstring string)) *MockState_Fail_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockState_Fail_Call) Return(_a0 State) *MockState_Fail_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Fail_Call) RunAndReturn(run func(string) State) *MockState_Fail_Call { + _c.Call.Return(run) + return _c +} + +// IsFailState provides a mock function with given fields: +func (_m *MockState) IsFailState() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsFailState") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockState_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' +type MockState_IsFailState_Call struct { + *mock.Call +} + +// IsFailState is a helper method to define mock.On call +func (_e *MockState_Expecter) IsFailState() *MockState_IsFailState_Call { + return &MockState_IsFailState_Call{Call: _e.mock.On("IsFailState")} +} + +func (_c *MockState_IsFailState_Call) Run(run func()) *MockState_IsFailState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_IsFailState_Call) Return(_a0 bool) *MockState_IsFailState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_IsFailState_Call) RunAndReturn(run func() bool) *MockState_IsFailState_Call { + _c.Call.Return(run) + return _c +} + +// IsSuccessState provides a mock function with given fields: +func (_m *MockState) IsSuccessState() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsSuccessState") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockState_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' +type MockState_IsSuccessState_Call struct { + *mock.Call +} + +// IsSuccessState is a helper method to define mock.On call +func (_e *MockState_Expecter) IsSuccessState() *MockState_IsSuccessState_Call { + return &MockState_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} +} + +func (_c *MockState_IsSuccessState_Call) Run(run func()) *MockState_IsSuccessState_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_IsSuccessState_Call) Return(_a0 bool) *MockState_IsSuccessState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_IsSuccessState_Call) RunAndReturn(run func() bool) *MockState_IsSuccessState_Call { + _c.Call.Return(run) + return _c +} + +// Receive provides a mock function with given fields: args, kwargs +func (_m *MockState) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) State { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Receive") + } + + var r0 State + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) State); ok { + r0 = rf(args, kwargs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' +type MockState_Receive_Call struct { + *mock.Call +} + +// Receive is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockState_Expecter) Receive(args interface{}, kwargs interface{}) *MockState_Receive_Call { + return &MockState_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} +} + +func (_c *MockState_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockState_Receive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockState_Receive_Call) Return(_a0 State) *MockState_Receive_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) State) *MockState_Receive_Call { + _c.Call.Return(run) + return _c +} + +// Reset provides a mock function with given fields: +func (_m *MockState) Reset() { + _m.Called() +} + +// MockState_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' +type MockState_Reset_Call struct { + *mock.Call +} + +// Reset is a helper method to define mock.On call +func (_e *MockState_Expecter) Reset() *MockState_Reset_Call { + return &MockState_Reset_Call{Call: _e.mock.On("Reset")} +} + +func (_c *MockState_Reset_Call) Run(run func()) *MockState_Reset_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_Reset_Call) Return() *MockState_Reset_Call { + _c.Call.Return() + return _c +} + +func (_c *MockState_Reset_Call) RunAndReturn(run func()) *MockState_Reset_Call { + _c.Call.Return(run) + return _c +} + +// Send provides a mock function with given fields: pdu, nextState +func (_m *MockState) Send(pdu bacnetip.PDU, nextState State) State { + ret := _m.Called(pdu, nextState) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 State + if rf, ok := ret.Get(0).(func(bacnetip.PDU, State) State); ok { + r0 = rf(pdu, nextState) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type MockState_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - pdu bacnetip.PDU +// - nextState State +func (_e *MockState_Expecter) Send(pdu interface{}, nextState interface{}) *MockState_Send_Call { + return &MockState_Send_Call{Call: _e.mock.On("Send", pdu, nextState)} +} + +func (_c *MockState_Send_Call) Run(run func(pdu bacnetip.PDU, nextState State)) *MockState_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU), args[1].(State)) + }) + return _c +} + +func (_c *MockState_Send_Call) Return(_a0 State) *MockState_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Send_Call) RunAndReturn(run func(bacnetip.PDU, State) State) *MockState_Send_Call { + _c.Call.Return(run) + return _c +} + +// SetEvent provides a mock function with given fields: eventId +func (_m *MockState) SetEvent(eventId string) State { + ret := _m.Called(eventId) + + if len(ret) == 0 { + panic("no return value specified for SetEvent") + } + + var r0 State + if rf, ok := ret.Get(0).(func(string) State); ok { + r0 = rf(eventId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_SetEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEvent' +type MockState_SetEvent_Call struct { + *mock.Call +} + +// SetEvent is a helper method to define mock.On call +// - eventId string +func (_e *MockState_Expecter) SetEvent(eventId interface{}) *MockState_SetEvent_Call { + return &MockState_SetEvent_Call{Call: _e.mock.On("SetEvent", eventId)} +} + +func (_c *MockState_SetEvent_Call) Run(run func(eventId string)) *MockState_SetEvent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockState_SetEvent_Call) Return(_a0 State) *MockState_SetEvent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_SetEvent_Call) RunAndReturn(run func(string) State) *MockState_SetEvent_Call { + _c.Call.Return(run) + return _c +} + +// String provides a mock function with given fields: +func (_m *MockState) 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 +} + +// MockState_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type MockState_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *MockState_Expecter) String() *MockState_String_Call { + return &MockState_String_Call{Call: _e.mock.On("String")} +} + +func (_c *MockState_String_Call) Run(run func()) *MockState_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_String_Call) Return(_a0 string) *MockState_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_String_Call) RunAndReturn(run func() string) *MockState_String_Call { + _c.Call.Return(run) + return _c +} + +// Success provides a mock function with given fields: docstring +func (_m *MockState) Success(docstring string) State { + ret := _m.Called(docstring) + + if len(ret) == 0 { + panic("no return value specified for Success") + } + + var r0 State + if rf, ok := ret.Get(0).(func(string) State); ok { + r0 = rf(docstring) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Success_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Success' +type MockState_Success_Call struct { + *mock.Call +} + +// Success is a helper method to define mock.On call +// - docstring string +func (_e *MockState_Expecter) Success(docstring interface{}) *MockState_Success_Call { + return &MockState_Success_Call{Call: _e.mock.On("Success", docstring)} +} + +func (_c *MockState_Success_Call) Run(run func(docstring string)) *MockState_Success_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockState_Success_Call) Return(_a0 State) *MockState_Success_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Success_Call) RunAndReturn(run func(string) State) *MockState_Success_Call { + _c.Call.Return(run) + return _c +} + +// Timeout provides a mock function with given fields: duration, nextState +func (_m *MockState) Timeout(duration time.Duration, nextState State) State { + ret := _m.Called(duration, nextState) + + if len(ret) == 0 { + panic("no return value specified for Timeout") + } + + var r0 State + if rf, ok := ret.Get(0).(func(time.Duration, State) State); ok { + r0 = rf(duration, nextState) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_Timeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Timeout' +type MockState_Timeout_Call struct { + *mock.Call +} + +// Timeout is a helper method to define mock.On call +// - duration time.Duration +// - nextState State +func (_e *MockState_Expecter) Timeout(duration interface{}, nextState interface{}) *MockState_Timeout_Call { + return &MockState_Timeout_Call{Call: _e.mock.On("Timeout", duration, nextState)} +} + +func (_c *MockState_Timeout_Call) Run(run func(duration time.Duration, nextState State)) *MockState_Timeout_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(time.Duration), args[1].(State)) + }) + return _c +} + +func (_c *MockState_Timeout_Call) Return(_a0 State) *MockState_Timeout_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_Timeout_Call) RunAndReturn(run func(time.Duration, State) State) *MockState_Timeout_Call { + _c.Call.Return(run) + return _c +} + +// WaitEvent provides a mock function with given fields: eventId, nextState +func (_m *MockState) WaitEvent(eventId string, nextState State) State { + ret := _m.Called(eventId, nextState) + + if len(ret) == 0 { + panic("no return value specified for WaitEvent") + } + + var r0 State + if rf, ok := ret.Get(0).(func(string, State) State); ok { + r0 = rf(eventId, nextState) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(State) + } + } + + return r0 +} + +// MockState_WaitEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitEvent' +type MockState_WaitEvent_Call struct { + *mock.Call +} + +// WaitEvent is a helper method to define mock.On call +// - eventId string +// - nextState State +func (_e *MockState_Expecter) WaitEvent(eventId interface{}, nextState interface{}) *MockState_WaitEvent_Call { + return &MockState_WaitEvent_Call{Call: _e.mock.On("WaitEvent", eventId, nextState)} +} + +func (_c *MockState_WaitEvent_Call) Run(run func(eventId string, nextState State)) *MockState_WaitEvent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(State)) + }) + return _c +} + +func (_c *MockState_WaitEvent_Call) Return(_a0 State) *MockState_WaitEvent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_WaitEvent_Call) RunAndReturn(run func(string, State) State) *MockState_WaitEvent_Call { + _c.Call.Return(run) + return _c +} + +// getCallTransition provides a mock function with given fields: +func (_m *MockState) getCallTransition() *CallTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getCallTransition") + } + + var r0 *CallTransition + if rf, ok := ret.Get(0).(func() *CallTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*CallTransition) + } + } + + return r0 +} + +// MockState_getCallTransition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCallTransition' +type MockState_getCallTransition_Call struct { + *mock.Call +} + +// getCallTransition is a helper method to define mock.On call +func (_e *MockState_Expecter) getCallTransition() *MockState_getCallTransition_Call { + return &MockState_getCallTransition_Call{Call: _e.mock.On("getCallTransition")} +} + +func (_c *MockState_getCallTransition_Call) Run(run func()) *MockState_getCallTransition_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getCallTransition_Call) Return(_a0 *CallTransition) *MockState_getCallTransition_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getCallTransition_Call) RunAndReturn(run func() *CallTransition) *MockState_getCallTransition_Call { + _c.Call.Return(run) + return _c +} + +// getClearEventTransitions provides a mock function with given fields: +func (_m *MockState) getClearEventTransitions() []EventTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getClearEventTransitions") + } + + var r0 []EventTransition + if rf, ok := ret.Get(0).(func() []EventTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]EventTransition) + } + } + + return r0 +} + +// MockState_getClearEventTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClearEventTransitions' +type MockState_getClearEventTransitions_Call struct { + *mock.Call +} + +// getClearEventTransitions is a helper method to define mock.On call +func (_e *MockState_Expecter) getClearEventTransitions() *MockState_getClearEventTransitions_Call { + return &MockState_getClearEventTransitions_Call{Call: _e.mock.On("getClearEventTransitions")} +} + +func (_c *MockState_getClearEventTransitions_Call) Run(run func()) *MockState_getClearEventTransitions_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getClearEventTransitions_Call) Return(_a0 []EventTransition) *MockState_getClearEventTransitions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getClearEventTransitions_Call) RunAndReturn(run func() []EventTransition) *MockState_getClearEventTransitions_Call { + _c.Call.Return(run) + return _c +} + +// getDocString provides a mock function with given fields: +func (_m *MockState) getDocString() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getDocString") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockState_getDocString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getDocString' +type MockState_getDocString_Call struct { + *mock.Call +} + +// getDocString is a helper method to define mock.On call +func (_e *MockState_Expecter) getDocString() *MockState_getDocString_Call { + return &MockState_getDocString_Call{Call: _e.mock.On("getDocString")} +} + +func (_c *MockState_getDocString_Call) Run(run func()) *MockState_getDocString_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getDocString_Call) Return(_a0 string) *MockState_getDocString_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getDocString_Call) RunAndReturn(run func() string) *MockState_getDocString_Call { + _c.Call.Return(run) + return _c +} + +// getInterceptor provides a mock function with given fields: +func (_m *MockState) getInterceptor() StateInterceptor { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getInterceptor") + } + + var r0 StateInterceptor + if rf, ok := ret.Get(0).(func() StateInterceptor); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(StateInterceptor) + } + } + + return r0 +} + +// MockState_getInterceptor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getInterceptor' +type MockState_getInterceptor_Call struct { + *mock.Call +} + +// getInterceptor is a helper method to define mock.On call +func (_e *MockState_Expecter) getInterceptor() *MockState_getInterceptor_Call { + return &MockState_getInterceptor_Call{Call: _e.mock.On("getInterceptor")} +} + +func (_c *MockState_getInterceptor_Call) Run(run func()) *MockState_getInterceptor_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getInterceptor_Call) Return(_a0 StateInterceptor) *MockState_getInterceptor_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getInterceptor_Call) RunAndReturn(run func() StateInterceptor) *MockState_getInterceptor_Call { + _c.Call.Return(run) + return _c +} + +// getReceiveTransitions provides a mock function with given fields: +func (_m *MockState) getReceiveTransitions() []ReceiveTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getReceiveTransitions") + } + + var r0 []ReceiveTransition + if rf, ok := ret.Get(0).(func() []ReceiveTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]ReceiveTransition) + } + } + + return r0 +} + +// MockState_getReceiveTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getReceiveTransitions' +type MockState_getReceiveTransitions_Call struct { + *mock.Call +} + +// getReceiveTransitions is a helper method to define mock.On call +func (_e *MockState_Expecter) getReceiveTransitions() *MockState_getReceiveTransitions_Call { + return &MockState_getReceiveTransitions_Call{Call: _e.mock.On("getReceiveTransitions")} +} + +func (_c *MockState_getReceiveTransitions_Call) Run(run func()) *MockState_getReceiveTransitions_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getReceiveTransitions_Call) Return(_a0 []ReceiveTransition) *MockState_getReceiveTransitions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getReceiveTransitions_Call) RunAndReturn(run func() []ReceiveTransition) *MockState_getReceiveTransitions_Call { + _c.Call.Return(run) + return _c +} + +// getSendTransitions provides a mock function with given fields: +func (_m *MockState) getSendTransitions() []SendTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getSendTransitions") + } + + var r0 []SendTransition + if rf, ok := ret.Get(0).(func() []SendTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]SendTransition) + } + } + + return r0 +} + +// MockState_getSendTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getSendTransitions' +type MockState_getSendTransitions_Call struct { + *mock.Call +} + +// getSendTransitions is a helper method to define mock.On call +func (_e *MockState_Expecter) getSendTransitions() *MockState_getSendTransitions_Call { + return &MockState_getSendTransitions_Call{Call: _e.mock.On("getSendTransitions")} +} + +func (_c *MockState_getSendTransitions_Call) Run(run func()) *MockState_getSendTransitions_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getSendTransitions_Call) Return(_a0 []SendTransition) *MockState_getSendTransitions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getSendTransitions_Call) RunAndReturn(run func() []SendTransition) *MockState_getSendTransitions_Call { + _c.Call.Return(run) + return _c +} + +// getSetEventTransitions provides a mock function with given fields: +func (_m *MockState) getSetEventTransitions() []EventTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getSetEventTransitions") + } + + var r0 []EventTransition + if rf, ok := ret.Get(0).(func() []EventTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]EventTransition) + } + } + + return r0 +} + +// MockState_getSetEventTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getSetEventTransitions' +type MockState_getSetEventTransitions_Call struct { + *mock.Call +} + +// getSetEventTransitions is a helper method to define mock.On call +func (_e *MockState_Expecter) getSetEventTransitions() *MockState_getSetEventTransitions_Call { + return &MockState_getSetEventTransitions_Call{Call: _e.mock.On("getSetEventTransitions")} +} + +func (_c *MockState_getSetEventTransitions_Call) Run(run func()) *MockState_getSetEventTransitions_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getSetEventTransitions_Call) Return(_a0 []EventTransition) *MockState_getSetEventTransitions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getSetEventTransitions_Call) RunAndReturn(run func() []EventTransition) *MockState_getSetEventTransitions_Call { + _c.Call.Return(run) + return _c +} + +// getStateMachine provides a mock function with given fields: +func (_m *MockState) getStateMachine() StateMachine { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getStateMachine") + } + + var r0 StateMachine + if rf, ok := ret.Get(0).(func() StateMachine); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(StateMachine) + } + } + + return r0 +} + +// MockState_getStateMachine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateMachine' +type MockState_getStateMachine_Call struct { + *mock.Call +} + +// getStateMachine is a helper method to define mock.On call +func (_e *MockState_Expecter) getStateMachine() *MockState_getStateMachine_Call { + return &MockState_getStateMachine_Call{Call: _e.mock.On("getStateMachine")} +} + +func (_c *MockState_getStateMachine_Call) Run(run func()) *MockState_getStateMachine_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getStateMachine_Call) Return(_a0 StateMachine) *MockState_getStateMachine_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getStateMachine_Call) RunAndReturn(run func() StateMachine) *MockState_getStateMachine_Call { + _c.Call.Return(run) + return _c +} + +// getTimeoutTransition provides a mock function with given fields: +func (_m *MockState) getTimeoutTransition() *TimeoutTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getTimeoutTransition") + } + + var r0 *TimeoutTransition + if rf, ok := ret.Get(0).(func() *TimeoutTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*TimeoutTransition) + } + } + + return r0 +} + +// MockState_getTimeoutTransition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getTimeoutTransition' +type MockState_getTimeoutTransition_Call struct { + *mock.Call +} + +// getTimeoutTransition is a helper method to define mock.On call +func (_e *MockState_Expecter) getTimeoutTransition() *MockState_getTimeoutTransition_Call { + return &MockState_getTimeoutTransition_Call{Call: _e.mock.On("getTimeoutTransition")} +} + +func (_c *MockState_getTimeoutTransition_Call) Run(run func()) *MockState_getTimeoutTransition_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getTimeoutTransition_Call) Return(_a0 *TimeoutTransition) *MockState_getTimeoutTransition_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getTimeoutTransition_Call) RunAndReturn(run func() *TimeoutTransition) *MockState_getTimeoutTransition_Call { + _c.Call.Return(run) + return _c +} + +// getWaitEventTransitions provides a mock function with given fields: +func (_m *MockState) getWaitEventTransitions() []EventTransition { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for getWaitEventTransitions") + } + + var r0 []EventTransition + if rf, ok := ret.Get(0).(func() []EventTransition); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]EventTransition) + } + } + + return r0 +} + +// MockState_getWaitEventTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getWaitEventTransitions' +type MockState_getWaitEventTransitions_Call struct { + *mock.Call +} + +// getWaitEventTransitions is a helper method to define mock.On call +func (_e *MockState_Expecter) getWaitEventTransitions() *MockState_getWaitEventTransitions_Call { + return &MockState_getWaitEventTransitions_Call{Call: _e.mock.On("getWaitEventTransitions")} +} + +func (_c *MockState_getWaitEventTransitions_Call) Run(run func()) *MockState_getWaitEventTransitions_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockState_getWaitEventTransitions_Call) Return(_a0 []EventTransition) *MockState_getWaitEventTransitions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockState_getWaitEventTransitions_Call) RunAndReturn(run func() []EventTransition) *MockState_getWaitEventTransitions_Call { + _c.Call.Return(run) + return _c +} + +// setStateMachine provides a mock function with given fields: _a0 +func (_m *MockState) setStateMachine(_a0 StateMachine) { + _m.Called(_a0) +} + +// MockState_setStateMachine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setStateMachine' +type MockState_setStateMachine_Call struct { + *mock.Call +} + +// setStateMachine is a helper method to define mock.On call +// - _a0 StateMachine +func (_e *MockState_Expecter) setStateMachine(_a0 interface{}) *MockState_setStateMachine_Call { + return &MockState_setStateMachine_Call{Call: _e.mock.On("setStateMachine", _a0)} +} + +func (_c *MockState_setStateMachine_Call) Run(run func(_a0 StateMachine)) *MockState_setStateMachine_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(StateMachine)) + }) + return _c +} + +func (_c *MockState_setStateMachine_Call) Return() *MockState_setStateMachine_Call { + _c.Call.Return() + return _c +} + +func (_c *MockState_setStateMachine_Call) RunAndReturn(run func(StateMachine)) *MockState_setStateMachine_Call { + _c.Call.Return(run) + return _c +} + +// NewMockState creates a new instance of MockState. 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 NewMockState(t interface { + mock.TestingT + Cleanup(func()) +}) *MockState { + mock := &MockState{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go new file mode 100644 index 00000000000..f57ee337f6a --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go @@ -0,0 +1,242 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockTrappedApplicationServiceElementRequirements is an autogenerated mock type for the TrappedApplicationServiceElementRequirements type +type MockTrappedApplicationServiceElementRequirements struct { + mock.Mock +} + +type MockTrappedApplicationServiceElementRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTrappedApplicationServiceElementRequirements) EXPECT() *MockTrappedApplicationServiceElementRequirements_Expecter { + return &MockTrappedApplicationServiceElementRequirements_Expecter{mock: &_m.Mock} +} + +// Confirmation provides a mock function with given fields: args, kwargs +func (_m *MockTrappedApplicationServiceElementRequirements) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Confirmation") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedApplicationServiceElementRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' +type MockTrappedApplicationServiceElementRequirements_Confirmation_Call struct { + *mock.Call +} + +// Confirmation is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { + return &MockTrappedApplicationServiceElementRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Confirmation_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { + _c.Call.Return(run) + return _c +} + +// Indication provides a mock function with given fields: args, kwargs +func (_m *MockTrappedApplicationServiceElementRequirements) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Indication") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedApplicationServiceElementRequirements_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' +type MockTrappedApplicationServiceElementRequirements_Indication_Call struct { + *mock.Call +} + +// Indication is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Indication(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Indication_Call { + return &MockTrappedApplicationServiceElementRequirements_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Indication_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Indication_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Indication_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Indication_Call { + _c.Call.Return(run) + return _c +} + +// Request provides a mock function with given fields: args, kwargs +func (_m *MockTrappedApplicationServiceElementRequirements) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Request") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedApplicationServiceElementRequirements_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' +type MockTrappedApplicationServiceElementRequirements_Request_Call struct { + *mock.Call +} + +// Request is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Request(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Request_Call { + return &MockTrappedApplicationServiceElementRequirements_Request_Call{Call: _e.mock.On("Request", args, kwargs)} +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Request_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Request_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Request_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Request_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Request_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Request_Call { + _c.Call.Return(run) + return _c +} + +// Response provides a mock function with given fields: args, kwargs +func (_m *MockTrappedApplicationServiceElementRequirements) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Response") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedApplicationServiceElementRequirements_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' +type MockTrappedApplicationServiceElementRequirements_Response_Call struct { + *mock.Call +} + +// Response is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Response(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Response_Call { + return &MockTrappedApplicationServiceElementRequirements_Response_Call{Call: _e.mock.On("Response", args, kwargs)} +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Response_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Response_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Response_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Response_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedApplicationServiceElementRequirements_Response_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Response_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTrappedApplicationServiceElementRequirements creates a new instance of MockTrappedApplicationServiceElementRequirements. 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 NewMockTrappedApplicationServiceElementRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTrappedApplicationServiceElementRequirements { + mock := &MockTrappedApplicationServiceElementRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go new file mode 100644 index 00000000000..53eafb3f89d --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go @@ -0,0 +1,148 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockTrappedClientContract is an autogenerated mock type for the TrappedClientContract type +type MockTrappedClientContract struct { + mock.Mock +} + +type MockTrappedClientContract_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTrappedClientContract) EXPECT() *MockTrappedClientContract_Expecter { + return &MockTrappedClientContract_Expecter{mock: &_m.Mock} +} + +// Confirmation provides a mock function with given fields: args, kwargs +func (_m *MockTrappedClientContract) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Confirmation") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedClientContract_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' +type MockTrappedClientContract_Confirmation_Call struct { + *mock.Call +} + +// Confirmation is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedClientContract_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockTrappedClientContract_Confirmation_Call { + return &MockTrappedClientContract_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} +} + +func (_c *MockTrappedClientContract_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedClientContract_Confirmation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedClientContract_Confirmation_Call) Return(_a0 error) *MockTrappedClientContract_Confirmation_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedClientContract_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedClientContract_Confirmation_Call { + _c.Call.Return(run) + return _c +} + +// Request provides a mock function with given fields: _a0, _a1 +func (_m *MockTrappedClientContract) Request(_a0 bacnetip.Args, _a1 bacnetip.KWArgs) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for Request") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedClientContract_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' +type MockTrappedClientContract_Request_Call struct { + *mock.Call +} + +// Request is a helper method to define mock.On call +// - _a0 bacnetip.Args +// - _a1 bacnetip.KWArgs +func (_e *MockTrappedClientContract_Expecter) Request(_a0 interface{}, _a1 interface{}) *MockTrappedClientContract_Request_Call { + return &MockTrappedClientContract_Request_Call{Call: _e.mock.On("Request", _a0, _a1)} +} + +func (_c *MockTrappedClientContract_Request_Call) Run(run func(_a0 bacnetip.Args, _a1 bacnetip.KWArgs)) *MockTrappedClientContract_Request_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedClientContract_Request_Call) Return(_a0 error) *MockTrappedClientContract_Request_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedClientContract_Request_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedClientContract_Request_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTrappedClientContract creates a new instance of MockTrappedClientContract. 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 NewMockTrappedClientContract(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTrappedClientContract { + mock := &MockTrappedClientContract{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go new file mode 100644 index 00000000000..f0f919a20ad --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go @@ -0,0 +1,148 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockTrappedServerContract is an autogenerated mock type for the TrappedServerContract type +type MockTrappedServerContract struct { + mock.Mock +} + +type MockTrappedServerContract_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTrappedServerContract) EXPECT() *MockTrappedServerContract_Expecter { + return &MockTrappedServerContract_Expecter{mock: &_m.Mock} +} + +// Indication provides a mock function with given fields: args, kwargs +func (_m *MockTrappedServerContract) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Indication") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedServerContract_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' +type MockTrappedServerContract_Indication_Call struct { + *mock.Call +} + +// Indication is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedServerContract_Expecter) Indication(args interface{}, kwargs interface{}) *MockTrappedServerContract_Indication_Call { + return &MockTrappedServerContract_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} +} + +func (_c *MockTrappedServerContract_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServerContract_Indication_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedServerContract_Indication_Call) Return(_a0 error) *MockTrappedServerContract_Indication_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedServerContract_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServerContract_Indication_Call { + _c.Call.Return(run) + return _c +} + +// Response provides a mock function with given fields: _a0, _a1 +func (_m *MockTrappedServerContract) Response(_a0 bacnetip.Args, _a1 bacnetip.KWArgs) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for Response") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedServerContract_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' +type MockTrappedServerContract_Response_Call struct { + *mock.Call +} + +// Response is a helper method to define mock.On call +// - _a0 bacnetip.Args +// - _a1 bacnetip.KWArgs +func (_e *MockTrappedServerContract_Expecter) Response(_a0 interface{}, _a1 interface{}) *MockTrappedServerContract_Response_Call { + return &MockTrappedServerContract_Response_Call{Call: _e.mock.On("Response", _a0, _a1)} +} + +func (_c *MockTrappedServerContract_Response_Call) Run(run func(_a0 bacnetip.Args, _a1 bacnetip.KWArgs)) *MockTrappedServerContract_Response_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedServerContract_Response_Call) Return(_a0 error) *MockTrappedServerContract_Response_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedServerContract_Response_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServerContract_Response_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTrappedServerContract creates a new instance of MockTrappedServerContract. 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 NewMockTrappedServerContract(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTrappedServerContract { + mock := &MockTrappedServerContract{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go new file mode 100644 index 00000000000..5d6155adaad --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go @@ -0,0 +1,242 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockTrappedServiceAccessPointRequirements is an autogenerated mock type for the TrappedServiceAccessPointRequirements type +type MockTrappedServiceAccessPointRequirements struct { + mock.Mock +} + +type MockTrappedServiceAccessPointRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTrappedServiceAccessPointRequirements) EXPECT() *MockTrappedServiceAccessPointRequirements_Expecter { + return &MockTrappedServiceAccessPointRequirements_Expecter{mock: &_m.Mock} +} + +// SapConfirmation provides a mock function with given fields: args, kwargs +func (_m *MockTrappedServiceAccessPointRequirements) SapConfirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for SapConfirmation") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedServiceAccessPointRequirements_SapConfirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapConfirmation' +type MockTrappedServiceAccessPointRequirements_SapConfirmation_Call struct { + *mock.Call +} + +// SapConfirmation is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapConfirmation(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { + return &MockTrappedServiceAccessPointRequirements_SapConfirmation_Call{Call: _e.mock.On("SapConfirmation", args, kwargs)} +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { + _c.Call.Return(run) + return _c +} + +// SapIndication provides a mock function with given fields: args, kwargs +func (_m *MockTrappedServiceAccessPointRequirements) SapIndication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for SapIndication") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedServiceAccessPointRequirements_SapIndication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapIndication' +type MockTrappedServiceAccessPointRequirements_SapIndication_Call struct { + *mock.Call +} + +// SapIndication is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapIndication(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { + return &MockTrappedServiceAccessPointRequirements_SapIndication_Call{Call: _e.mock.On("SapIndication", args, kwargs)} +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapIndication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapIndication_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapIndication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { + _c.Call.Return(run) + return _c +} + +// SapRequest provides a mock function with given fields: args, kwargs +func (_m *MockTrappedServiceAccessPointRequirements) SapRequest(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for SapRequest") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedServiceAccessPointRequirements_SapRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapRequest' +type MockTrappedServiceAccessPointRequirements_SapRequest_Call struct { + *mock.Call +} + +// SapRequest is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapRequest(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { + return &MockTrappedServiceAccessPointRequirements_SapRequest_Call{Call: _e.mock.On("SapRequest", args, kwargs)} +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapRequest_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapRequest_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapRequest_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { + _c.Call.Return(run) + return _c +} + +// SapResponse provides a mock function with given fields: args, kwargs +func (_m *MockTrappedServiceAccessPointRequirements) SapResponse(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for SapResponse") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTrappedServiceAccessPointRequirements_SapResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapResponse' +type MockTrappedServiceAccessPointRequirements_SapResponse_Call struct { + *mock.Call +} + +// SapResponse is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapResponse(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { + return &MockTrappedServiceAccessPointRequirements_SapResponse_Call{Call: _e.mock.On("SapResponse", args, kwargs)} +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapResponse_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapResponse_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTrappedServiceAccessPointRequirements_SapResponse_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTrappedServiceAccessPointRequirements creates a new instance of MockTrappedServiceAccessPointRequirements. 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 NewMockTrappedServiceAccessPointRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTrappedServiceAccessPointRequirements { + mock := &MockTrappedServiceAccessPointRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go new file mode 100644 index 00000000000..5ac2904cbfc --- /dev/null +++ b/plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go @@ -0,0 +1,219 @@ +/* + * 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 tests + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockTrapperRequirements is an autogenerated mock type for the TrapperRequirements type +type MockTrapperRequirements struct { + mock.Mock +} + +type MockTrapperRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTrapperRequirements) EXPECT() *MockTrapperRequirements_Expecter { + return &MockTrapperRequirements_Expecter{mock: &_m.Mock} +} + +// AfterReceive provides a mock function with given fields: pdu +func (_m *MockTrapperRequirements) AfterReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockTrapperRequirements_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' +type MockTrapperRequirements_AfterReceive_Call struct { + *mock.Call +} + +// AfterReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockTrapperRequirements_Expecter) AfterReceive(pdu interface{}) *MockTrapperRequirements_AfterReceive_Call { + return &MockTrapperRequirements_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} +} + +func (_c *MockTrapperRequirements_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_AfterReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockTrapperRequirements_AfterReceive_Call) Return() *MockTrapperRequirements_AfterReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTrapperRequirements_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_AfterReceive_Call { + _c.Call.Return(run) + return _c +} + +// AfterSend provides a mock function with given fields: pdu +func (_m *MockTrapperRequirements) AfterSend(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockTrapperRequirements_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' +type MockTrapperRequirements_AfterSend_Call struct { + *mock.Call +} + +// AfterSend is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockTrapperRequirements_Expecter) AfterSend(pdu interface{}) *MockTrapperRequirements_AfterSend_Call { + return &MockTrapperRequirements_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} +} + +func (_c *MockTrapperRequirements_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_AfterSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockTrapperRequirements_AfterSend_Call) Return() *MockTrapperRequirements_AfterSend_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTrapperRequirements_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_AfterSend_Call { + _c.Call.Return(run) + return _c +} + +// BeforeReceive provides a mock function with given fields: pdu +func (_m *MockTrapperRequirements) BeforeReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockTrapperRequirements_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' +type MockTrapperRequirements_BeforeReceive_Call struct { + *mock.Call +} + +// BeforeReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockTrapperRequirements_Expecter) BeforeReceive(pdu interface{}) *MockTrapperRequirements_BeforeReceive_Call { + return &MockTrapperRequirements_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} +} + +func (_c *MockTrapperRequirements_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_BeforeReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockTrapperRequirements_BeforeReceive_Call) Return() *MockTrapperRequirements_BeforeReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTrapperRequirements_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_BeforeReceive_Call { + _c.Call.Return(run) + return _c +} + +// BeforeSend provides a mock function with given fields: pdu +func (_m *MockTrapperRequirements) BeforeSend(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockTrapperRequirements_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' +type MockTrapperRequirements_BeforeSend_Call struct { + *mock.Call +} + +// BeforeSend is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockTrapperRequirements_Expecter) BeforeSend(pdu interface{}) *MockTrapperRequirements_BeforeSend_Call { + return &MockTrapperRequirements_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} +} + +func (_c *MockTrapperRequirements_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_BeforeSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockTrapperRequirements_BeforeSend_Call) Return() *MockTrapperRequirements_BeforeSend_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTrapperRequirements_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_BeforeSend_Call { + _c.Call.Return(run) + return _c +} + +// UnexpectedReceive provides a mock function with given fields: pdu +func (_m *MockTrapperRequirements) UnexpectedReceive(pdu bacnetip.PDU) { + _m.Called(pdu) +} + +// MockTrapperRequirements_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' +type MockTrapperRequirements_UnexpectedReceive_Call struct { + *mock.Call +} + +// UnexpectedReceive is a helper method to define mock.On call +// - pdu bacnetip.PDU +func (_e *MockTrapperRequirements_Expecter) UnexpectedReceive(pdu interface{}) *MockTrapperRequirements_UnexpectedReceive_Call { + return &MockTrapperRequirements_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} +} + +func (_c *MockTrapperRequirements_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_UnexpectedReceive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.PDU)) + }) + return _c +} + +func (_c *MockTrapperRequirements_UnexpectedReceive_Call) Return() *MockTrapperRequirements_UnexpectedReceive_Call { + _c.Call.Return() + return _c +} + +func (_c *MockTrapperRequirements_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_UnexpectedReceive_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTrapperRequirements creates a new instance of MockTrapperRequirements. 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 NewMockTrapperRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTrapperRequirements { + mock := &MockTrapperRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go b/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go new file mode 100644 index 00000000000..ed59222c092 --- /dev/null +++ b/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go @@ -0,0 +1,148 @@ +/* + * 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 test_service + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockApplicationNetworkRequirements is an autogenerated mock type for the ApplicationNetworkRequirements type +type MockApplicationNetworkRequirements struct { + mock.Mock +} + +type MockApplicationNetworkRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockApplicationNetworkRequirements) EXPECT() *MockApplicationNetworkRequirements_Expecter { + return &MockApplicationNetworkRequirements_Expecter{mock: &_m.Mock} +} + +// Confirmation provides a mock function with given fields: args, kwargs +func (_m *MockApplicationNetworkRequirements) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Confirmation") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockApplicationNetworkRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' +type MockApplicationNetworkRequirements_Confirmation_Call struct { + *mock.Call +} + +// Confirmation is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockApplicationNetworkRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationNetworkRequirements_Confirmation_Call { + return &MockApplicationNetworkRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} +} + +func (_c *MockApplicationNetworkRequirements_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationNetworkRequirements_Confirmation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockApplicationNetworkRequirements_Confirmation_Call) Return(_a0 error) *MockApplicationNetworkRequirements_Confirmation_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockApplicationNetworkRequirements_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationNetworkRequirements_Confirmation_Call { + _c.Call.Return(run) + return _c +} + +// Indication provides a mock function with given fields: args, kwargs +func (_m *MockApplicationNetworkRequirements) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Indication") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockApplicationNetworkRequirements_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' +type MockApplicationNetworkRequirements_Indication_Call struct { + *mock.Call +} + +// Indication is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockApplicationNetworkRequirements_Expecter) Indication(args interface{}, kwargs interface{}) *MockApplicationNetworkRequirements_Indication_Call { + return &MockApplicationNetworkRequirements_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} +} + +func (_c *MockApplicationNetworkRequirements_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationNetworkRequirements_Indication_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockApplicationNetworkRequirements_Indication_Call) Return(_a0 error) *MockApplicationNetworkRequirements_Indication_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockApplicationNetworkRequirements_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationNetworkRequirements_Indication_Call { + _c.Call.Return(run) + return _c +} + +// NewMockApplicationNetworkRequirements creates a new instance of MockApplicationNetworkRequirements. 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 NewMockApplicationNetworkRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockApplicationNetworkRequirements { + mock := &MockApplicationNetworkRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go b/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go new file mode 100644 index 00000000000..ad3f25a304d --- /dev/null +++ b/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go @@ -0,0 +1,148 @@ +/* + * 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 test_service + +import ( + bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" + mock "github.com/stretchr/testify/mock" +) + +// MockApplicationStateMachineRequirements is an autogenerated mock type for the ApplicationStateMachineRequirements type +type MockApplicationStateMachineRequirements struct { + mock.Mock +} + +type MockApplicationStateMachineRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockApplicationStateMachineRequirements) EXPECT() *MockApplicationStateMachineRequirements_Expecter { + return &MockApplicationStateMachineRequirements_Expecter{mock: &_m.Mock} +} + +// Confirmation provides a mock function with given fields: args, kwargs +func (_m *MockApplicationStateMachineRequirements) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Confirmation") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockApplicationStateMachineRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' +type MockApplicationStateMachineRequirements_Confirmation_Call struct { + *mock.Call +} + +// Confirmation is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockApplicationStateMachineRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationStateMachineRequirements_Confirmation_Call { + return &MockApplicationStateMachineRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} +} + +func (_c *MockApplicationStateMachineRequirements_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationStateMachineRequirements_Confirmation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockApplicationStateMachineRequirements_Confirmation_Call) Return(_a0 error) *MockApplicationStateMachineRequirements_Confirmation_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockApplicationStateMachineRequirements_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationStateMachineRequirements_Confirmation_Call { + _c.Call.Return(run) + return _c +} + +// Indication provides a mock function with given fields: args, kwargs +func (_m *MockApplicationStateMachineRequirements) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { + ret := _m.Called(args, kwargs) + + if len(ret) == 0 { + panic("no return value specified for Indication") + } + + var r0 error + if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { + r0 = rf(args, kwargs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockApplicationStateMachineRequirements_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' +type MockApplicationStateMachineRequirements_Indication_Call struct { + *mock.Call +} + +// Indication is a helper method to define mock.On call +// - args bacnetip.Args +// - kwargs bacnetip.KWArgs +func (_e *MockApplicationStateMachineRequirements_Expecter) Indication(args interface{}, kwargs interface{}) *MockApplicationStateMachineRequirements_Indication_Call { + return &MockApplicationStateMachineRequirements_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} +} + +func (_c *MockApplicationStateMachineRequirements_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationStateMachineRequirements_Indication_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) + }) + return _c +} + +func (_c *MockApplicationStateMachineRequirements_Indication_Call) Return(_a0 error) *MockApplicationStateMachineRequirements_Indication_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockApplicationStateMachineRequirements_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationStateMachineRequirements_Indication_Call { + _c.Call.Return(run) + return _c +} + +// NewMockApplicationStateMachineRequirements creates a new instance of MockApplicationStateMachineRequirements. 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 NewMockApplicationStateMachineRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockApplicationStateMachineRequirements { + mock := &MockApplicationStateMachineRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go b/plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go new file mode 100644 index 00000000000..794720e2d29 --- /dev/null +++ b/plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go @@ -0,0 +1,51 @@ +/* + * 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 test_service + +import mock "github.com/stretchr/testify/mock" + +// MockCOVTestClientServicesRequirements is an autogenerated mock type for the COVTestClientServicesRequirements type +type MockCOVTestClientServicesRequirements struct { + mock.Mock +} + +type MockCOVTestClientServicesRequirements_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCOVTestClientServicesRequirements) EXPECT() *MockCOVTestClientServicesRequirements_Expecter { + return &MockCOVTestClientServicesRequirements_Expecter{mock: &_m.Mock} +} + +// NewMockCOVTestClientServicesRequirements creates a new instance of MockCOVTestClientServicesRequirements. 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 NewMockCOVTestClientServicesRequirements(t interface { + mock.TestingT + Cleanup(func()) +}) *MockCOVTestClientServicesRequirements { + mock := &MockCOVTestClientServicesRequirements{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go index bc89eb89b10..64177c99b86 100644 --- a/plc4go/protocols/bacnetip/readwrite/ParserHelper.go +++ b/plc4go/protocols/bacnetip/readwrite/ParserHelper.go @@ -752,8 +752,6 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util } tagClass, _ := model.TagClassByName(arguments[1]) return model.BACnetRelationshipTaggedParseWithBuffer(context.Background(), io, tagNumber, tagClass) - case "NLMInitalizeRoutingTablePortMapping": - return model.NLMInitalizeRoutingTablePortMappingParseWithBuffer(context.Background(), io) case "BACnetRecipientProcessEnclosed": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { @@ -1156,6 +1154,8 @@ func (m BacnetipParserHelper) Parse(typeName string, arguments []string, io util return model.NLMParseWithBuffer(context.Background(), io, apduLength) case "BACnetWeekNDay": return model.BACnetWeekNDayParseWithBuffer(context.Background(), io) + case "NLMInitializeRoutingTablePortMapping": + return model.NLMInitializeRoutingTablePortMappingParseWithBuffer(context.Background(), io) case "NPDUNetworkPriorityTagged": tagNumber, err := utils.StrToUint8(arguments[0]) if err != nil { diff --git a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go index 9943d006aa4..c324c1464a3 100644 --- a/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go +++ b/plc4go/protocols/bacnetip/readwrite/XmlParserHelper.go @@ -858,8 +858,6 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser tagNumber := uint8(parsedUint0) tagClass, _ := model.TagClassByName(parserArguments[1]) return model.BACnetRelationshipTaggedParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), tagNumber, tagClass) - case "NLMInitalizeRoutingTablePortMapping": - return model.NLMInitalizeRoutingTablePortMappingParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) case "BACnetRecipientProcessEnclosed": parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) if err != nil { @@ -1310,6 +1308,8 @@ func (m BacnetipXmlParserHelper) Parse(typeName string, xmlString string, parser return model.NLMParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString)), apduLength) case "BACnetWeekNDay": return model.BACnetWeekNDayParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) + case "NLMInitializeRoutingTablePortMapping": + return model.NLMInitializeRoutingTablePortMappingParseWithBuffer(context.Background(), utils.NewXmlReadBuffer(strings.NewReader(xmlString))) case "NPDUNetworkPriorityTagged": parsedUint0, err := strconv.ParseUint(parserArguments[0], 10, 8) if err != nil { diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLM.go b/plc4go/protocols/bacnetip/readwrite/model/NLM.go index 65866172787..e5066eac397 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLM.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLM.go @@ -174,10 +174,10 @@ func NLMParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLe _childTemp, typeSwitchError = NLMRouterBusyToNetworkParseWithBuffer(ctx, readBuffer, apduLength) case messageType == 0x05: // NLMRouterAvailableToNetwork _childTemp, typeSwitchError = NLMRouterAvailableToNetworkParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x06: // NLMInitalizeRoutingTable - _childTemp, typeSwitchError = NLMInitalizeRoutingTableParseWithBuffer(ctx, readBuffer, apduLength) - case messageType == 0x07: // NLMInitalizeRoutingTableAck - _childTemp, typeSwitchError = NLMInitalizeRoutingTableAckParseWithBuffer(ctx, readBuffer, apduLength) + case messageType == 0x06: // NLMInitializeRoutingTable + _childTemp, typeSwitchError = NLMInitializeRoutingTableParseWithBuffer(ctx, readBuffer, apduLength) + case messageType == 0x07: // NLMInitializeRoutingTableAck + _childTemp, typeSwitchError = NLMInitializeRoutingTableAckParseWithBuffer(ctx, readBuffer, apduLength) case messageType == 0x08: // NLMEstablishConnectionToNetwork _childTemp, typeSwitchError = NLMEstablishConnectionToNetworkParseWithBuffer(ctx, readBuffer, apduLength) case messageType == 0x09: // NLMDisconnectConnectionToNetwork diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go b/plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTable.go similarity index 64% rename from plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go rename to plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTable.go index 7ae848cc14c..889f21a285e 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTable.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTable.go @@ -29,8 +29,8 @@ import ( // Code generated by code-generation. DO NOT EDIT. -// NLMInitalizeRoutingTable is the corresponding interface of NLMInitalizeRoutingTable -type NLMInitalizeRoutingTable interface { +// NLMInitializeRoutingTable is the corresponding interface of NLMInitializeRoutingTable +type NLMInitializeRoutingTable interface { fmt.Stringer utils.LengthAware utils.Serializable @@ -38,21 +38,21 @@ type NLMInitalizeRoutingTable interface { // GetNumberOfPorts returns NumberOfPorts (property field) GetNumberOfPorts() uint8 // GetPortMappings returns PortMappings (property field) - GetPortMappings() []NLMInitalizeRoutingTablePortMapping + GetPortMappings() []NLMInitializeRoutingTablePortMapping } -// NLMInitalizeRoutingTableExactly can be used when we want exactly this type and not a type which fulfills NLMInitalizeRoutingTable. +// NLMInitializeRoutingTableExactly can be used when we want exactly this type and not a type which fulfills NLMInitializeRoutingTable. // This is useful for switch cases. -type NLMInitalizeRoutingTableExactly interface { - NLMInitalizeRoutingTable - isNLMInitalizeRoutingTable() bool +type NLMInitializeRoutingTableExactly interface { + NLMInitializeRoutingTable + isNLMInitializeRoutingTable() bool } -// _NLMInitalizeRoutingTable is the data-structure of this message -type _NLMInitalizeRoutingTable struct { +// _NLMInitializeRoutingTable is the data-structure of this message +type _NLMInitializeRoutingTable struct { *_NLM NumberOfPorts uint8 - PortMappings []NLMInitalizeRoutingTablePortMapping + PortMappings []NLMInitializeRoutingTablePortMapping } /////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ type _NLMInitalizeRoutingTable struct { /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMInitalizeRoutingTable) GetMessageType() uint8 { +func (m *_NLMInitializeRoutingTable) GetMessageType() uint8 { return 0x06 } @@ -69,9 +69,9 @@ func (m *_NLMInitalizeRoutingTable) GetMessageType() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMInitalizeRoutingTable) InitializeParent(parent NLM) {} +func (m *_NLMInitializeRoutingTable) InitializeParent(parent NLM) {} -func (m *_NLMInitalizeRoutingTable) GetParent() NLM { +func (m *_NLMInitializeRoutingTable) GetParent() NLM { return m._NLM } @@ -80,11 +80,11 @@ func (m *_NLMInitalizeRoutingTable) GetParent() NLM { /////////////////////// Accessors for property fields. /////////////////////// -func (m *_NLMInitalizeRoutingTable) GetNumberOfPorts() uint8 { +func (m *_NLMInitializeRoutingTable) GetNumberOfPorts() uint8 { return m.NumberOfPorts } -func (m *_NLMInitalizeRoutingTable) GetPortMappings() []NLMInitalizeRoutingTablePortMapping { +func (m *_NLMInitializeRoutingTable) GetPortMappings() []NLMInitializeRoutingTablePortMapping { return m.PortMappings } @@ -93,9 +93,9 @@ func (m *_NLMInitalizeRoutingTable) GetPortMappings() []NLMInitalizeRoutingTable /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -// NewNLMInitalizeRoutingTable factory function for _NLMInitalizeRoutingTable -func NewNLMInitalizeRoutingTable(numberOfPorts uint8, portMappings []NLMInitalizeRoutingTablePortMapping, apduLength uint16) *_NLMInitalizeRoutingTable { - _result := &_NLMInitalizeRoutingTable{ +// NewNLMInitializeRoutingTable factory function for _NLMInitializeRoutingTable +func NewNLMInitializeRoutingTable(numberOfPorts uint8, portMappings []NLMInitializeRoutingTablePortMapping, apduLength uint16) *_NLMInitializeRoutingTable { + _result := &_NLMInitializeRoutingTable{ NumberOfPorts: numberOfPorts, PortMappings: portMappings, _NLM: NewNLM(apduLength), @@ -105,21 +105,21 @@ func NewNLMInitalizeRoutingTable(numberOfPorts uint8, portMappings []NLMInitaliz } // Deprecated: use the interface for direct cast -func CastNLMInitalizeRoutingTable(structType any) NLMInitalizeRoutingTable { - if casted, ok := structType.(NLMInitalizeRoutingTable); ok { +func CastNLMInitializeRoutingTable(structType any) NLMInitializeRoutingTable { + if casted, ok := structType.(NLMInitializeRoutingTable); ok { return casted } - if casted, ok := structType.(*NLMInitalizeRoutingTable); ok { + if casted, ok := structType.(*NLMInitializeRoutingTable); ok { return *casted } return nil } -func (m *_NLMInitalizeRoutingTable) GetTypeName() string { - return "NLMInitalizeRoutingTable" +func (m *_NLMInitializeRoutingTable) GetTypeName() string { + return "NLMInitializeRoutingTable" } -func (m *_NLMInitalizeRoutingTable) GetLengthInBits(ctx context.Context) uint16 { +func (m *_NLMInitializeRoutingTable) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numberOfPorts) @@ -138,21 +138,21 @@ func (m *_NLMInitalizeRoutingTable) GetLengthInBits(ctx context.Context) uint16 return lengthInBits } -func (m *_NLMInitalizeRoutingTable) GetLengthInBytes(ctx context.Context) uint16 { +func (m *_NLMInitializeRoutingTable) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } -func NLMInitalizeRoutingTableParse(ctx context.Context, theBytes []byte, apduLength uint16) (NLMInitalizeRoutingTable, error) { - return NLMInitalizeRoutingTableParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), apduLength) +func NLMInitializeRoutingTableParse(ctx context.Context, theBytes []byte, apduLength uint16) (NLMInitializeRoutingTable, error) { + return NLMInitializeRoutingTableParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), apduLength) } -func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLength uint16) (NLMInitalizeRoutingTable, error) { +func NLMInitializeRoutingTableParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLength uint16) (NLMInitializeRoutingTable, error) { positionAware := readBuffer _ = positionAware log := zerolog.Ctx(ctx) _ = log - if pullErr := readBuffer.PullContext("NLMInitalizeRoutingTable"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for NLMInitalizeRoutingTable") + if pullErr := readBuffer.PullContext("NLMInitializeRoutingTable"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for NLMInitializeRoutingTable") } currentPos := positionAware.GetPos() _ = currentPos @@ -160,7 +160,7 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti // Simple Field (numberOfPorts) _numberOfPorts, _numberOfPortsErr := readBuffer.ReadUint8("numberOfPorts", 8) if _numberOfPortsErr != nil { - return nil, errors.Wrap(_numberOfPortsErr, "Error parsing 'numberOfPorts' field of NLMInitalizeRoutingTable") + return nil, errors.Wrap(_numberOfPortsErr, "Error parsing 'numberOfPorts' field of NLMInitializeRoutingTable") } numberOfPorts := _numberOfPorts @@ -169,7 +169,7 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti return nil, errors.Wrap(pullErr, "Error pulling for portMappings") } // Count array - portMappings := make([]NLMInitalizeRoutingTablePortMapping, max(numberOfPorts, 0)) + portMappings := make([]NLMInitializeRoutingTablePortMapping, max(numberOfPorts, 0)) // This happens when the size is set conditional to 0 if len(portMappings) == 0 { portMappings = nil @@ -180,23 +180,23 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti arrayCtx := utils.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := NLMInitalizeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) + _item, _err := NLMInitializeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'portMappings' field of NLMInitalizeRoutingTable") + return nil, errors.Wrap(_err, "Error parsing 'portMappings' field of NLMInitializeRoutingTable") } - portMappings[_curItem] = _item.(NLMInitalizeRoutingTablePortMapping) + portMappings[_curItem] = _item.(NLMInitializeRoutingTablePortMapping) } } if closeErr := readBuffer.CloseContext("portMappings", utils.WithRenderAsList(true)); closeErr != nil { return nil, errors.Wrap(closeErr, "Error closing for portMappings") } - if closeErr := readBuffer.CloseContext("NLMInitalizeRoutingTable"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for NLMInitalizeRoutingTable") + if closeErr := readBuffer.CloseContext("NLMInitializeRoutingTable"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for NLMInitializeRoutingTable") } // Create a partially initialized instance - _child := &_NLMInitalizeRoutingTable{ + _child := &_NLMInitializeRoutingTable{ _NLM: &_NLM{ ApduLength: apduLength, }, @@ -207,7 +207,7 @@ func NLMInitalizeRoutingTableParseWithBuffer(ctx context.Context, readBuffer uti return _child, nil } -func (m *_NLMInitalizeRoutingTable) Serialize() ([]byte, error) { +func (m *_NLMInitializeRoutingTable) Serialize() ([]byte, error) { wb := utils.NewWriteBufferByteBased(utils.WithInitialSizeForByteBasedBuffer(int(m.GetLengthInBytes(context.Background())))) if err := m.SerializeWithWriteBuffer(context.Background(), wb); err != nil { return nil, err @@ -215,14 +215,14 @@ func (m *_NLMInitalizeRoutingTable) Serialize() ([]byte, error) { return wb.GetBytes(), nil } -func (m *_NLMInitalizeRoutingTable) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { +func (m *_NLMInitializeRoutingTable) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware log := zerolog.Ctx(ctx) _ = log ser := func() error { - if pushErr := writeBuffer.PushContext("NLMInitalizeRoutingTable"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for NLMInitalizeRoutingTable") + if pushErr := writeBuffer.PushContext("NLMInitializeRoutingTable"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for NLMInitializeRoutingTable") } // Simple Field (numberOfPorts) @@ -249,19 +249,19 @@ func (m *_NLMInitalizeRoutingTable) SerializeWithWriteBuffer(ctx context.Context return errors.Wrap(popErr, "Error popping for portMappings") } - if popErr := writeBuffer.PopContext("NLMInitalizeRoutingTable"); popErr != nil { - return errors.Wrap(popErr, "Error popping for NLMInitalizeRoutingTable") + if popErr := writeBuffer.PopContext("NLMInitializeRoutingTable"); popErr != nil { + return errors.Wrap(popErr, "Error popping for NLMInitializeRoutingTable") } return nil } return m.SerializeParent(ctx, writeBuffer, m, ser) } -func (m *_NLMInitalizeRoutingTable) isNLMInitalizeRoutingTable() bool { +func (m *_NLMInitializeRoutingTable) isNLMInitializeRoutingTable() bool { return true } -func (m *_NLMInitalizeRoutingTable) String() string { +func (m *_NLMInitializeRoutingTable) String() string { if m == nil { return "" } diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go b/plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTableAck.go similarity index 63% rename from plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go rename to plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTableAck.go index a73f558b737..2df7f49bd41 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTableAck.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTableAck.go @@ -29,8 +29,8 @@ import ( // Code generated by code-generation. DO NOT EDIT. -// NLMInitalizeRoutingTableAck is the corresponding interface of NLMInitalizeRoutingTableAck -type NLMInitalizeRoutingTableAck interface { +// NLMInitializeRoutingTableAck is the corresponding interface of NLMInitializeRoutingTableAck +type NLMInitializeRoutingTableAck interface { fmt.Stringer utils.LengthAware utils.Serializable @@ -38,21 +38,21 @@ type NLMInitalizeRoutingTableAck interface { // GetNumberOfPorts returns NumberOfPorts (property field) GetNumberOfPorts() uint8 // GetPortMappings returns PortMappings (property field) - GetPortMappings() []NLMInitalizeRoutingTablePortMapping + GetPortMappings() []NLMInitializeRoutingTablePortMapping } -// NLMInitalizeRoutingTableAckExactly can be used when we want exactly this type and not a type which fulfills NLMInitalizeRoutingTableAck. +// NLMInitializeRoutingTableAckExactly can be used when we want exactly this type and not a type which fulfills NLMInitializeRoutingTableAck. // This is useful for switch cases. -type NLMInitalizeRoutingTableAckExactly interface { - NLMInitalizeRoutingTableAck - isNLMInitalizeRoutingTableAck() bool +type NLMInitializeRoutingTableAckExactly interface { + NLMInitializeRoutingTableAck + isNLMInitializeRoutingTableAck() bool } -// _NLMInitalizeRoutingTableAck is the data-structure of this message -type _NLMInitalizeRoutingTableAck struct { +// _NLMInitializeRoutingTableAck is the data-structure of this message +type _NLMInitializeRoutingTableAck struct { *_NLM NumberOfPorts uint8 - PortMappings []NLMInitalizeRoutingTablePortMapping + PortMappings []NLMInitializeRoutingTablePortMapping } /////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ type _NLMInitalizeRoutingTableAck struct { /////////////////////// Accessors for discriminator values. /////////////////////// -func (m *_NLMInitalizeRoutingTableAck) GetMessageType() uint8 { +func (m *_NLMInitializeRoutingTableAck) GetMessageType() uint8 { return 0x07 } @@ -69,9 +69,9 @@ func (m *_NLMInitalizeRoutingTableAck) GetMessageType() uint8 { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -func (m *_NLMInitalizeRoutingTableAck) InitializeParent(parent NLM) {} +func (m *_NLMInitializeRoutingTableAck) InitializeParent(parent NLM) {} -func (m *_NLMInitalizeRoutingTableAck) GetParent() NLM { +func (m *_NLMInitializeRoutingTableAck) GetParent() NLM { return m._NLM } @@ -80,11 +80,11 @@ func (m *_NLMInitalizeRoutingTableAck) GetParent() NLM { /////////////////////// Accessors for property fields. /////////////////////// -func (m *_NLMInitalizeRoutingTableAck) GetNumberOfPorts() uint8 { +func (m *_NLMInitializeRoutingTableAck) GetNumberOfPorts() uint8 { return m.NumberOfPorts } -func (m *_NLMInitalizeRoutingTableAck) GetPortMappings() []NLMInitalizeRoutingTablePortMapping { +func (m *_NLMInitializeRoutingTableAck) GetPortMappings() []NLMInitializeRoutingTablePortMapping { return m.PortMappings } @@ -93,9 +93,9 @@ func (m *_NLMInitalizeRoutingTableAck) GetPortMappings() []NLMInitalizeRoutingTa /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -// NewNLMInitalizeRoutingTableAck factory function for _NLMInitalizeRoutingTableAck -func NewNLMInitalizeRoutingTableAck(numberOfPorts uint8, portMappings []NLMInitalizeRoutingTablePortMapping, apduLength uint16) *_NLMInitalizeRoutingTableAck { - _result := &_NLMInitalizeRoutingTableAck{ +// NewNLMInitializeRoutingTableAck factory function for _NLMInitializeRoutingTableAck +func NewNLMInitializeRoutingTableAck(numberOfPorts uint8, portMappings []NLMInitializeRoutingTablePortMapping, apduLength uint16) *_NLMInitializeRoutingTableAck { + _result := &_NLMInitializeRoutingTableAck{ NumberOfPorts: numberOfPorts, PortMappings: portMappings, _NLM: NewNLM(apduLength), @@ -105,21 +105,21 @@ func NewNLMInitalizeRoutingTableAck(numberOfPorts uint8, portMappings []NLMInita } // Deprecated: use the interface for direct cast -func CastNLMInitalizeRoutingTableAck(structType any) NLMInitalizeRoutingTableAck { - if casted, ok := structType.(NLMInitalizeRoutingTableAck); ok { +func CastNLMInitializeRoutingTableAck(structType any) NLMInitializeRoutingTableAck { + if casted, ok := structType.(NLMInitializeRoutingTableAck); ok { return casted } - if casted, ok := structType.(*NLMInitalizeRoutingTableAck); ok { + if casted, ok := structType.(*NLMInitializeRoutingTableAck); ok { return *casted } return nil } -func (m *_NLMInitalizeRoutingTableAck) GetTypeName() string { - return "NLMInitalizeRoutingTableAck" +func (m *_NLMInitializeRoutingTableAck) GetTypeName() string { + return "NLMInitializeRoutingTableAck" } -func (m *_NLMInitalizeRoutingTableAck) GetLengthInBits(ctx context.Context) uint16 { +func (m *_NLMInitializeRoutingTableAck) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(m.GetParentLengthInBits(ctx)) // Simple field (numberOfPorts) @@ -138,21 +138,21 @@ func (m *_NLMInitalizeRoutingTableAck) GetLengthInBits(ctx context.Context) uint return lengthInBits } -func (m *_NLMInitalizeRoutingTableAck) GetLengthInBytes(ctx context.Context) uint16 { +func (m *_NLMInitializeRoutingTableAck) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } -func NLMInitalizeRoutingTableAckParse(ctx context.Context, theBytes []byte, apduLength uint16) (NLMInitalizeRoutingTableAck, error) { - return NLMInitalizeRoutingTableAckParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), apduLength) +func NLMInitializeRoutingTableAckParse(ctx context.Context, theBytes []byte, apduLength uint16) (NLMInitializeRoutingTableAck, error) { + return NLMInitializeRoutingTableAckParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes), apduLength) } -func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLength uint16) (NLMInitalizeRoutingTableAck, error) { +func NLMInitializeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer, apduLength uint16) (NLMInitializeRoutingTableAck, error) { positionAware := readBuffer _ = positionAware log := zerolog.Ctx(ctx) _ = log - if pullErr := readBuffer.PullContext("NLMInitalizeRoutingTableAck"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for NLMInitalizeRoutingTableAck") + if pullErr := readBuffer.PullContext("NLMInitializeRoutingTableAck"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for NLMInitializeRoutingTableAck") } currentPos := positionAware.GetPos() _ = currentPos @@ -160,7 +160,7 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer // Simple Field (numberOfPorts) _numberOfPorts, _numberOfPortsErr := readBuffer.ReadUint8("numberOfPorts", 8) if _numberOfPortsErr != nil { - return nil, errors.Wrap(_numberOfPortsErr, "Error parsing 'numberOfPorts' field of NLMInitalizeRoutingTableAck") + return nil, errors.Wrap(_numberOfPortsErr, "Error parsing 'numberOfPorts' field of NLMInitializeRoutingTableAck") } numberOfPorts := _numberOfPorts @@ -169,7 +169,7 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer return nil, errors.Wrap(pullErr, "Error pulling for portMappings") } // Count array - portMappings := make([]NLMInitalizeRoutingTablePortMapping, max(numberOfPorts, 0)) + portMappings := make([]NLMInitializeRoutingTablePortMapping, max(numberOfPorts, 0)) // This happens when the size is set conditional to 0 if len(portMappings) == 0 { portMappings = nil @@ -180,23 +180,23 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer arrayCtx := utils.CreateArrayContext(ctx, int(_numItems), int(_curItem)) _ = arrayCtx _ = _curItem - _item, _err := NLMInitalizeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) + _item, _err := NLMInitializeRoutingTablePortMappingParseWithBuffer(arrayCtx, readBuffer) if _err != nil { - return nil, errors.Wrap(_err, "Error parsing 'portMappings' field of NLMInitalizeRoutingTableAck") + return nil, errors.Wrap(_err, "Error parsing 'portMappings' field of NLMInitializeRoutingTableAck") } - portMappings[_curItem] = _item.(NLMInitalizeRoutingTablePortMapping) + portMappings[_curItem] = _item.(NLMInitializeRoutingTablePortMapping) } } if closeErr := readBuffer.CloseContext("portMappings", utils.WithRenderAsList(true)); closeErr != nil { return nil, errors.Wrap(closeErr, "Error closing for portMappings") } - if closeErr := readBuffer.CloseContext("NLMInitalizeRoutingTableAck"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for NLMInitalizeRoutingTableAck") + if closeErr := readBuffer.CloseContext("NLMInitializeRoutingTableAck"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for NLMInitializeRoutingTableAck") } // Create a partially initialized instance - _child := &_NLMInitalizeRoutingTableAck{ + _child := &_NLMInitializeRoutingTableAck{ _NLM: &_NLM{ ApduLength: apduLength, }, @@ -207,7 +207,7 @@ func NLMInitalizeRoutingTableAckParseWithBuffer(ctx context.Context, readBuffer return _child, nil } -func (m *_NLMInitalizeRoutingTableAck) Serialize() ([]byte, error) { +func (m *_NLMInitializeRoutingTableAck) Serialize() ([]byte, error) { wb := utils.NewWriteBufferByteBased(utils.WithInitialSizeForByteBasedBuffer(int(m.GetLengthInBytes(context.Background())))) if err := m.SerializeWithWriteBuffer(context.Background(), wb); err != nil { return nil, err @@ -215,14 +215,14 @@ func (m *_NLMInitalizeRoutingTableAck) Serialize() ([]byte, error) { return wb.GetBytes(), nil } -func (m *_NLMInitalizeRoutingTableAck) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { +func (m *_NLMInitializeRoutingTableAck) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware log := zerolog.Ctx(ctx) _ = log ser := func() error { - if pushErr := writeBuffer.PushContext("NLMInitalizeRoutingTableAck"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for NLMInitalizeRoutingTableAck") + if pushErr := writeBuffer.PushContext("NLMInitializeRoutingTableAck"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for NLMInitializeRoutingTableAck") } // Simple Field (numberOfPorts) @@ -249,19 +249,19 @@ func (m *_NLMInitalizeRoutingTableAck) SerializeWithWriteBuffer(ctx context.Cont return errors.Wrap(popErr, "Error popping for portMappings") } - if popErr := writeBuffer.PopContext("NLMInitalizeRoutingTableAck"); popErr != nil { - return errors.Wrap(popErr, "Error popping for NLMInitalizeRoutingTableAck") + if popErr := writeBuffer.PopContext("NLMInitializeRoutingTableAck"); popErr != nil { + return errors.Wrap(popErr, "Error popping for NLMInitializeRoutingTableAck") } return nil } return m.SerializeParent(ctx, writeBuffer, m, ser) } -func (m *_NLMInitalizeRoutingTableAck) isNLMInitalizeRoutingTableAck() bool { +func (m *_NLMInitializeRoutingTableAck) isNLMInitializeRoutingTableAck() bool { return true } -func (m *_NLMInitalizeRoutingTableAck) String() string { +func (m *_NLMInitializeRoutingTableAck) String() string { if m == nil { return "" } diff --git a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go b/plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTablePortMapping.go similarity index 61% rename from plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go rename to plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTablePortMapping.go index 7ecb6b15646..9b1a7ff2e99 100644 --- a/plc4go/protocols/bacnetip/readwrite/model/NLMInitalizeRoutingTablePortMapping.go +++ b/plc4go/protocols/bacnetip/readwrite/model/NLMInitializeRoutingTablePortMapping.go @@ -29,8 +29,8 @@ import ( // Code generated by code-generation. DO NOT EDIT. -// NLMInitalizeRoutingTablePortMapping is the corresponding interface of NLMInitalizeRoutingTablePortMapping -type NLMInitalizeRoutingTablePortMapping interface { +// NLMInitializeRoutingTablePortMapping is the corresponding interface of NLMInitializeRoutingTablePortMapping +type NLMInitializeRoutingTablePortMapping interface { fmt.Stringer utils.LengthAware utils.Serializable @@ -44,15 +44,15 @@ type NLMInitalizeRoutingTablePortMapping interface { GetPortInfo() []byte } -// NLMInitalizeRoutingTablePortMappingExactly can be used when we want exactly this type and not a type which fulfills NLMInitalizeRoutingTablePortMapping. +// NLMInitializeRoutingTablePortMappingExactly can be used when we want exactly this type and not a type which fulfills NLMInitializeRoutingTablePortMapping. // This is useful for switch cases. -type NLMInitalizeRoutingTablePortMappingExactly interface { - NLMInitalizeRoutingTablePortMapping - isNLMInitalizeRoutingTablePortMapping() bool +type NLMInitializeRoutingTablePortMappingExactly interface { + NLMInitializeRoutingTablePortMapping + isNLMInitializeRoutingTablePortMapping() bool } -// _NLMInitalizeRoutingTablePortMapping is the data-structure of this message -type _NLMInitalizeRoutingTablePortMapping struct { +// _NLMInitializeRoutingTablePortMapping is the data-structure of this message +type _NLMInitializeRoutingTablePortMapping struct { DestinationNetworkAddress uint16 PortId uint8 PortInfoLength uint8 @@ -64,19 +64,19 @@ type _NLMInitalizeRoutingTablePortMapping struct { /////////////////////// Accessors for property fields. /////////////////////// -func (m *_NLMInitalizeRoutingTablePortMapping) GetDestinationNetworkAddress() uint16 { +func (m *_NLMInitializeRoutingTablePortMapping) GetDestinationNetworkAddress() uint16 { return m.DestinationNetworkAddress } -func (m *_NLMInitalizeRoutingTablePortMapping) GetPortId() uint8 { +func (m *_NLMInitializeRoutingTablePortMapping) GetPortId() uint8 { return m.PortId } -func (m *_NLMInitalizeRoutingTablePortMapping) GetPortInfoLength() uint8 { +func (m *_NLMInitializeRoutingTablePortMapping) GetPortInfoLength() uint8 { return m.PortInfoLength } -func (m *_NLMInitalizeRoutingTablePortMapping) GetPortInfo() []byte { +func (m *_NLMInitializeRoutingTablePortMapping) GetPortInfo() []byte { return m.PortInfo } @@ -85,27 +85,27 @@ func (m *_NLMInitalizeRoutingTablePortMapping) GetPortInfo() []byte { /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// -// NewNLMInitalizeRoutingTablePortMapping factory function for _NLMInitalizeRoutingTablePortMapping -func NewNLMInitalizeRoutingTablePortMapping(destinationNetworkAddress uint16, portId uint8, portInfoLength uint8, portInfo []byte) *_NLMInitalizeRoutingTablePortMapping { - return &_NLMInitalizeRoutingTablePortMapping{DestinationNetworkAddress: destinationNetworkAddress, PortId: portId, PortInfoLength: portInfoLength, PortInfo: portInfo} +// NewNLMInitializeRoutingTablePortMapping factory function for _NLMInitializeRoutingTablePortMapping +func NewNLMInitializeRoutingTablePortMapping(destinationNetworkAddress uint16, portId uint8, portInfoLength uint8, portInfo []byte) *_NLMInitializeRoutingTablePortMapping { + return &_NLMInitializeRoutingTablePortMapping{DestinationNetworkAddress: destinationNetworkAddress, PortId: portId, PortInfoLength: portInfoLength, PortInfo: portInfo} } // Deprecated: use the interface for direct cast -func CastNLMInitalizeRoutingTablePortMapping(structType any) NLMInitalizeRoutingTablePortMapping { - if casted, ok := structType.(NLMInitalizeRoutingTablePortMapping); ok { +func CastNLMInitializeRoutingTablePortMapping(structType any) NLMInitializeRoutingTablePortMapping { + if casted, ok := structType.(NLMInitializeRoutingTablePortMapping); ok { return casted } - if casted, ok := structType.(*NLMInitalizeRoutingTablePortMapping); ok { + if casted, ok := structType.(*NLMInitializeRoutingTablePortMapping); ok { return *casted } return nil } -func (m *_NLMInitalizeRoutingTablePortMapping) GetTypeName() string { - return "NLMInitalizeRoutingTablePortMapping" +func (m *_NLMInitializeRoutingTablePortMapping) GetTypeName() string { + return "NLMInitializeRoutingTablePortMapping" } -func (m *_NLMInitalizeRoutingTablePortMapping) GetLengthInBits(ctx context.Context) uint16 { +func (m *_NLMInitializeRoutingTablePortMapping) GetLengthInBits(ctx context.Context) uint16 { lengthInBits := uint16(0) // Simple field (destinationNetworkAddress) @@ -125,21 +125,21 @@ func (m *_NLMInitalizeRoutingTablePortMapping) GetLengthInBits(ctx context.Conte return lengthInBits } -func (m *_NLMInitalizeRoutingTablePortMapping) GetLengthInBytes(ctx context.Context) uint16 { +func (m *_NLMInitializeRoutingTablePortMapping) GetLengthInBytes(ctx context.Context) uint16 { return m.GetLengthInBits(ctx) / 8 } -func NLMInitalizeRoutingTablePortMappingParse(ctx context.Context, theBytes []byte) (NLMInitalizeRoutingTablePortMapping, error) { - return NLMInitalizeRoutingTablePortMappingParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes)) +func NLMInitializeRoutingTablePortMappingParse(ctx context.Context, theBytes []byte) (NLMInitializeRoutingTablePortMapping, error) { + return NLMInitializeRoutingTablePortMappingParseWithBuffer(ctx, utils.NewReadBufferByteBased(theBytes)) } -func NLMInitalizeRoutingTablePortMappingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (NLMInitalizeRoutingTablePortMapping, error) { +func NLMInitializeRoutingTablePortMappingParseWithBuffer(ctx context.Context, readBuffer utils.ReadBuffer) (NLMInitializeRoutingTablePortMapping, error) { positionAware := readBuffer _ = positionAware log := zerolog.Ctx(ctx) _ = log - if pullErr := readBuffer.PullContext("NLMInitalizeRoutingTablePortMapping"); pullErr != nil { - return nil, errors.Wrap(pullErr, "Error pulling for NLMInitalizeRoutingTablePortMapping") + if pullErr := readBuffer.PullContext("NLMInitializeRoutingTablePortMapping"); pullErr != nil { + return nil, errors.Wrap(pullErr, "Error pulling for NLMInitializeRoutingTablePortMapping") } currentPos := positionAware.GetPos() _ = currentPos @@ -147,36 +147,36 @@ func NLMInitalizeRoutingTablePortMappingParseWithBuffer(ctx context.Context, rea // Simple Field (destinationNetworkAddress) _destinationNetworkAddress, _destinationNetworkAddressErr := readBuffer.ReadUint16("destinationNetworkAddress", 16) if _destinationNetworkAddressErr != nil { - return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMInitalizeRoutingTablePortMapping") + return nil, errors.Wrap(_destinationNetworkAddressErr, "Error parsing 'destinationNetworkAddress' field of NLMInitializeRoutingTablePortMapping") } destinationNetworkAddress := _destinationNetworkAddress // Simple Field (portId) _portId, _portIdErr := readBuffer.ReadUint8("portId", 8) if _portIdErr != nil { - return nil, errors.Wrap(_portIdErr, "Error parsing 'portId' field of NLMInitalizeRoutingTablePortMapping") + return nil, errors.Wrap(_portIdErr, "Error parsing 'portId' field of NLMInitializeRoutingTablePortMapping") } portId := _portId // Simple Field (portInfoLength) _portInfoLength, _portInfoLengthErr := readBuffer.ReadUint8("portInfoLength", 8) if _portInfoLengthErr != nil { - return nil, errors.Wrap(_portInfoLengthErr, "Error parsing 'portInfoLength' field of NLMInitalizeRoutingTablePortMapping") + return nil, errors.Wrap(_portInfoLengthErr, "Error parsing 'portInfoLength' field of NLMInitializeRoutingTablePortMapping") } portInfoLength := _portInfoLength // Byte Array field (portInfo) numberOfBytesportInfo := int(portInfoLength) portInfo, _readArrayErr := readBuffer.ReadByteArray("portInfo", numberOfBytesportInfo) if _readArrayErr != nil { - return nil, errors.Wrap(_readArrayErr, "Error parsing 'portInfo' field of NLMInitalizeRoutingTablePortMapping") + return nil, errors.Wrap(_readArrayErr, "Error parsing 'portInfo' field of NLMInitializeRoutingTablePortMapping") } - if closeErr := readBuffer.CloseContext("NLMInitalizeRoutingTablePortMapping"); closeErr != nil { - return nil, errors.Wrap(closeErr, "Error closing for NLMInitalizeRoutingTablePortMapping") + if closeErr := readBuffer.CloseContext("NLMInitializeRoutingTablePortMapping"); closeErr != nil { + return nil, errors.Wrap(closeErr, "Error closing for NLMInitializeRoutingTablePortMapping") } // Create the instance - return &_NLMInitalizeRoutingTablePortMapping{ + return &_NLMInitializeRoutingTablePortMapping{ DestinationNetworkAddress: destinationNetworkAddress, PortId: portId, PortInfoLength: portInfoLength, @@ -184,7 +184,7 @@ func NLMInitalizeRoutingTablePortMappingParseWithBuffer(ctx context.Context, rea }, nil } -func (m *_NLMInitalizeRoutingTablePortMapping) Serialize() ([]byte, error) { +func (m *_NLMInitializeRoutingTablePortMapping) Serialize() ([]byte, error) { wb := utils.NewWriteBufferByteBased(utils.WithInitialSizeForByteBasedBuffer(int(m.GetLengthInBytes(context.Background())))) if err := m.SerializeWithWriteBuffer(context.Background(), wb); err != nil { return nil, err @@ -192,13 +192,13 @@ func (m *_NLMInitalizeRoutingTablePortMapping) Serialize() ([]byte, error) { return wb.GetBytes(), nil } -func (m *_NLMInitalizeRoutingTablePortMapping) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { +func (m *_NLMInitializeRoutingTablePortMapping) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { positionAware := writeBuffer _ = positionAware log := zerolog.Ctx(ctx) _ = log - if pushErr := writeBuffer.PushContext("NLMInitalizeRoutingTablePortMapping"); pushErr != nil { - return errors.Wrap(pushErr, "Error pushing for NLMInitalizeRoutingTablePortMapping") + if pushErr := writeBuffer.PushContext("NLMInitializeRoutingTablePortMapping"); pushErr != nil { + return errors.Wrap(pushErr, "Error pushing for NLMInitializeRoutingTablePortMapping") } // Simple Field (destinationNetworkAddress) @@ -228,17 +228,17 @@ func (m *_NLMInitalizeRoutingTablePortMapping) SerializeWithWriteBuffer(ctx cont return errors.Wrap(err, "Error serializing 'portInfo' field") } - if popErr := writeBuffer.PopContext("NLMInitalizeRoutingTablePortMapping"); popErr != nil { - return errors.Wrap(popErr, "Error popping for NLMInitalizeRoutingTablePortMapping") + if popErr := writeBuffer.PopContext("NLMInitializeRoutingTablePortMapping"); popErr != nil { + return errors.Wrap(popErr, "Error popping for NLMInitializeRoutingTablePortMapping") } return nil } -func (m *_NLMInitalizeRoutingTablePortMapping) isNLMInitalizeRoutingTablePortMapping() bool { +func (m *_NLMInitializeRoutingTablePortMapping) isNLMInitializeRoutingTablePortMapping() bool { return true } -func (m *_NLMInitalizeRoutingTablePortMapping) String() string { +func (m *_NLMInitializeRoutingTablePortMapping) String() string { if m == nil { return "" } diff --git a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLM.java b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLM.java index 9ef4ae4eaee..ebbccf1bc32 100644 --- a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLM.java +++ b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLM.java @@ -136,9 +136,9 @@ public static NLM staticParse(ReadBuffer readBuffer, Integer apduLength) throws } else if (EvaluationHelper.equals(messageType, (short) 0x05)) { builder = NLMRouterAvailableToNetwork.staticParseNLMBuilder(readBuffer, apduLength); } else if (EvaluationHelper.equals(messageType, (short) 0x06)) { - builder = NLMInitalizeRoutingTable.staticParseNLMBuilder(readBuffer, apduLength); + builder = NLMInitializeRoutingTable.staticParseNLMBuilder(readBuffer, apduLength); } else if (EvaluationHelper.equals(messageType, (short) 0x07)) { - builder = NLMInitalizeRoutingTableAck.staticParseNLMBuilder(readBuffer, apduLength); + builder = NLMInitializeRoutingTableAck.staticParseNLMBuilder(readBuffer, apduLength); } else if (EvaluationHelper.equals(messageType, (short) 0x08)) { builder = NLMEstablishConnectionToNetwork.staticParseNLMBuilder(readBuffer, apduLength); } else if (EvaluationHelper.equals(messageType, (short) 0x09)) { diff --git a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTable.java b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTable.java similarity index 74% rename from plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTable.java rename to plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTable.java index 584da4dae61..b1b0ec3353b 100644 --- a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTable.java +++ b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTable.java @@ -35,7 +35,7 @@ // Code generated by code-generation. DO NOT EDIT. -public class NLMInitalizeRoutingTable extends NLM implements Message { +public class NLMInitializeRoutingTable extends NLM implements Message { // Accessors for discriminator values. public Short getMessageType() { @@ -44,14 +44,14 @@ public Short getMessageType() { // Properties. protected final short numberOfPorts; - protected final List portMappings; + protected final List portMappings; // Arguments. protected final Integer apduLength; - public NLMInitalizeRoutingTable( + public NLMInitializeRoutingTable( short numberOfPorts, - List portMappings, + List portMappings, Integer apduLength) { super(apduLength); this.numberOfPorts = numberOfPorts; @@ -63,7 +63,7 @@ public short getNumberOfPorts() { return numberOfPorts; } - public List getPortMappings() { + public List getPortMappings() { return portMappings; } @@ -71,7 +71,7 @@ public List getPortMappings() { protected void serializeNLMChild(WriteBuffer writeBuffer) throws SerializationException { PositionAware positionAware = writeBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - writeBuffer.pushContext("NLMInitalizeRoutingTable"); + writeBuffer.pushContext("NLMInitializeRoutingTable"); // Simple Field (numberOfPorts) writeSimpleField("numberOfPorts", numberOfPorts, writeUnsignedShort(writeBuffer, 8)); @@ -79,7 +79,7 @@ protected void serializeNLMChild(WriteBuffer writeBuffer) throws SerializationEx // Array Field (portMappings) writeComplexTypeArrayField("portMappings", portMappings, writeBuffer); - writeBuffer.popContext("NLMInitalizeRoutingTable"); + writeBuffer.popContext("NLMInitializeRoutingTable"); } @Override @@ -90,7 +90,7 @@ public int getLengthInBytes() { @Override public int getLengthInBits() { int lengthInBits = super.getLengthInBits(); - NLMInitalizeRoutingTable _value = this; + NLMInitializeRoutingTable _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); // Simple field (numberOfPorts) @@ -99,7 +99,7 @@ public int getLengthInBits() { // Array field if (portMappings != null) { int i = 0; - for (NLMInitalizeRoutingTablePortMapping element : portMappings) { + for (NLMInitializeRoutingTablePortMapping element : portMappings) { ThreadLocalHelper.lastItemThreadLocal.set(++i >= portMappings.size()); lengthInBits += element.getLengthInBits(); } @@ -110,43 +110,43 @@ public int getLengthInBits() { public static NLMBuilder staticParseNLMBuilder(ReadBuffer readBuffer, Integer apduLength) throws ParseException { - readBuffer.pullContext("NLMInitalizeRoutingTable"); + readBuffer.pullContext("NLMInitializeRoutingTable"); PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); short numberOfPorts = readSimpleField("numberOfPorts", readUnsignedShort(readBuffer, 8)); - List portMappings = + List portMappings = readCountArrayField( "portMappings", new DataReaderComplexDefault<>( - () -> NLMInitalizeRoutingTablePortMapping.staticParse(readBuffer), readBuffer), + () -> NLMInitializeRoutingTablePortMapping.staticParse(readBuffer), readBuffer), numberOfPorts); - readBuffer.closeContext("NLMInitalizeRoutingTable"); + readBuffer.closeContext("NLMInitializeRoutingTable"); // Create the instance - return new NLMInitalizeRoutingTableBuilderImpl(numberOfPorts, portMappings, apduLength); + return new NLMInitializeRoutingTableBuilderImpl(numberOfPorts, portMappings, apduLength); } - public static class NLMInitalizeRoutingTableBuilderImpl implements NLM.NLMBuilder { + public static class NLMInitializeRoutingTableBuilderImpl implements NLM.NLMBuilder { private final short numberOfPorts; - private final List portMappings; + private final List portMappings; private final Integer apduLength; - public NLMInitalizeRoutingTableBuilderImpl( + public NLMInitializeRoutingTableBuilderImpl( short numberOfPorts, - List portMappings, + List portMappings, Integer apduLength) { this.numberOfPorts = numberOfPorts; this.portMappings = portMappings; this.apduLength = apduLength; } - public NLMInitalizeRoutingTable build(Integer apduLength) { + public NLMInitializeRoutingTable build(Integer apduLength) { - NLMInitalizeRoutingTable nLMInitalizeRoutingTable = - new NLMInitalizeRoutingTable(numberOfPorts, portMappings, apduLength); - return nLMInitalizeRoutingTable; + NLMInitializeRoutingTable nLMInitializeRoutingTable = + new NLMInitializeRoutingTable(numberOfPorts, portMappings, apduLength); + return nLMInitializeRoutingTable; } } @@ -155,10 +155,10 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof NLMInitalizeRoutingTable)) { + if (!(o instanceof NLMInitializeRoutingTable)) { return false; } - NLMInitalizeRoutingTable that = (NLMInitalizeRoutingTable) o; + NLMInitializeRoutingTable that = (NLMInitializeRoutingTable) o; return (getNumberOfPorts() == that.getNumberOfPorts()) && (getPortMappings() == that.getPortMappings()) && super.equals(that) diff --git a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTableAck.java b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTableAck.java similarity index 74% rename from plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTableAck.java rename to plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTableAck.java index 2e35a697247..3b6f49a5fd3 100644 --- a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTableAck.java +++ b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTableAck.java @@ -35,7 +35,7 @@ // Code generated by code-generation. DO NOT EDIT. -public class NLMInitalizeRoutingTableAck extends NLM implements Message { +public class NLMInitializeRoutingTableAck extends NLM implements Message { // Accessors for discriminator values. public Short getMessageType() { @@ -44,14 +44,14 @@ public Short getMessageType() { // Properties. protected final short numberOfPorts; - protected final List portMappings; + protected final List portMappings; // Arguments. protected final Integer apduLength; - public NLMInitalizeRoutingTableAck( + public NLMInitializeRoutingTableAck( short numberOfPorts, - List portMappings, + List portMappings, Integer apduLength) { super(apduLength); this.numberOfPorts = numberOfPorts; @@ -63,7 +63,7 @@ public short getNumberOfPorts() { return numberOfPorts; } - public List getPortMappings() { + public List getPortMappings() { return portMappings; } @@ -71,7 +71,7 @@ public List getPortMappings() { protected void serializeNLMChild(WriteBuffer writeBuffer) throws SerializationException { PositionAware positionAware = writeBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - writeBuffer.pushContext("NLMInitalizeRoutingTableAck"); + writeBuffer.pushContext("NLMInitializeRoutingTableAck"); // Simple Field (numberOfPorts) writeSimpleField("numberOfPorts", numberOfPorts, writeUnsignedShort(writeBuffer, 8)); @@ -79,7 +79,7 @@ protected void serializeNLMChild(WriteBuffer writeBuffer) throws SerializationEx // Array Field (portMappings) writeComplexTypeArrayField("portMappings", portMappings, writeBuffer); - writeBuffer.popContext("NLMInitalizeRoutingTableAck"); + writeBuffer.popContext("NLMInitializeRoutingTableAck"); } @Override @@ -90,7 +90,7 @@ public int getLengthInBytes() { @Override public int getLengthInBits() { int lengthInBits = super.getLengthInBits(); - NLMInitalizeRoutingTableAck _value = this; + NLMInitializeRoutingTableAck _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); // Simple field (numberOfPorts) @@ -99,7 +99,7 @@ public int getLengthInBits() { // Array field if (portMappings != null) { int i = 0; - for (NLMInitalizeRoutingTablePortMapping element : portMappings) { + for (NLMInitializeRoutingTablePortMapping element : portMappings) { ThreadLocalHelper.lastItemThreadLocal.set(++i >= portMappings.size()); lengthInBits += element.getLengthInBits(); } @@ -110,43 +110,43 @@ public int getLengthInBits() { public static NLMBuilder staticParseNLMBuilder(ReadBuffer readBuffer, Integer apduLength) throws ParseException { - readBuffer.pullContext("NLMInitalizeRoutingTableAck"); + readBuffer.pullContext("NLMInitializeRoutingTableAck"); PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); short numberOfPorts = readSimpleField("numberOfPorts", readUnsignedShort(readBuffer, 8)); - List portMappings = + List portMappings = readCountArrayField( "portMappings", new DataReaderComplexDefault<>( - () -> NLMInitalizeRoutingTablePortMapping.staticParse(readBuffer), readBuffer), + () -> NLMInitializeRoutingTablePortMapping.staticParse(readBuffer), readBuffer), numberOfPorts); - readBuffer.closeContext("NLMInitalizeRoutingTableAck"); + readBuffer.closeContext("NLMInitializeRoutingTableAck"); // Create the instance - return new NLMInitalizeRoutingTableAckBuilderImpl(numberOfPorts, portMappings, apduLength); + return new NLMInitializeRoutingTableAckBuilderImpl(numberOfPorts, portMappings, apduLength); } - public static class NLMInitalizeRoutingTableAckBuilderImpl implements NLM.NLMBuilder { + public static class NLMInitializeRoutingTableAckBuilderImpl implements NLM.NLMBuilder { private final short numberOfPorts; - private final List portMappings; + private final List portMappings; private final Integer apduLength; - public NLMInitalizeRoutingTableAckBuilderImpl( + public NLMInitializeRoutingTableAckBuilderImpl( short numberOfPorts, - List portMappings, + List portMappings, Integer apduLength) { this.numberOfPorts = numberOfPorts; this.portMappings = portMappings; this.apduLength = apduLength; } - public NLMInitalizeRoutingTableAck build(Integer apduLength) { + public NLMInitializeRoutingTableAck build(Integer apduLength) { - NLMInitalizeRoutingTableAck nLMInitalizeRoutingTableAck = - new NLMInitalizeRoutingTableAck(numberOfPorts, portMappings, apduLength); - return nLMInitalizeRoutingTableAck; + NLMInitializeRoutingTableAck nLMInitializeRoutingTableAck = + new NLMInitializeRoutingTableAck(numberOfPorts, portMappings, apduLength); + return nLMInitializeRoutingTableAck; } } @@ -155,10 +155,10 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof NLMInitalizeRoutingTableAck)) { + if (!(o instanceof NLMInitializeRoutingTableAck)) { return false; } - NLMInitalizeRoutingTableAck that = (NLMInitalizeRoutingTableAck) o; + NLMInitializeRoutingTableAck that = (NLMInitializeRoutingTableAck) o; return (getNumberOfPorts() == that.getNumberOfPorts()) && (getPortMappings() == that.getPortMappings()) && super.equals(that) diff --git a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTablePortMapping.java b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTablePortMapping.java similarity index 84% rename from plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTablePortMapping.java rename to plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTablePortMapping.java index 206c195c1aa..852fe1c8782 100644 --- a/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitalizeRoutingTablePortMapping.java +++ b/plc4j/drivers/bacnet/src/main/generated/org/apache/plc4x/java/bacnetip/readwrite/NLMInitializeRoutingTablePortMapping.java @@ -35,7 +35,7 @@ // Code generated by code-generation. DO NOT EDIT. -public class NLMInitalizeRoutingTablePortMapping implements Message { +public class NLMInitializeRoutingTablePortMapping implements Message { // Properties. protected final int destinationNetworkAddress; @@ -43,7 +43,7 @@ public class NLMInitalizeRoutingTablePortMapping implements Message { protected final short portInfoLength; protected final byte[] portInfo; - public NLMInitalizeRoutingTablePortMapping( + public NLMInitializeRoutingTablePortMapping( int destinationNetworkAddress, short portId, short portInfoLength, byte[] portInfo) { super(); this.destinationNetworkAddress = destinationNetworkAddress; @@ -71,7 +71,7 @@ public byte[] getPortInfo() { public void serialize(WriteBuffer writeBuffer) throws SerializationException { PositionAware positionAware = writeBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); - writeBuffer.pushContext("NLMInitalizeRoutingTablePortMapping"); + writeBuffer.pushContext("NLMInitializeRoutingTablePortMapping"); // Simple Field (destinationNetworkAddress) writeSimpleField( @@ -86,7 +86,7 @@ public void serialize(WriteBuffer writeBuffer) throws SerializationException { // Array Field (portInfo) writeByteArrayField("portInfo", portInfo, writeByteArray(writeBuffer, 8)); - writeBuffer.popContext("NLMInitalizeRoutingTablePortMapping"); + writeBuffer.popContext("NLMInitializeRoutingTablePortMapping"); } @Override @@ -97,7 +97,7 @@ public int getLengthInBytes() { @Override public int getLengthInBits() { int lengthInBits = 0; - NLMInitalizeRoutingTablePortMapping _value = this; + NLMInitializeRoutingTablePortMapping _value = this; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); // Simple field (destinationNetworkAddress) @@ -117,15 +117,15 @@ public int getLengthInBits() { return lengthInBits; } - public static NLMInitalizeRoutingTablePortMapping staticParse( + public static NLMInitializeRoutingTablePortMapping staticParse( ReadBuffer readBuffer, Object... args) throws ParseException { PositionAware positionAware = readBuffer; return staticParse(readBuffer); } - public static NLMInitalizeRoutingTablePortMapping staticParse(ReadBuffer readBuffer) + public static NLMInitializeRoutingTablePortMapping staticParse(ReadBuffer readBuffer) throws ParseException { - readBuffer.pullContext("NLMInitalizeRoutingTablePortMapping"); + readBuffer.pullContext("NLMInitializeRoutingTablePortMapping"); PositionAware positionAware = readBuffer; boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get(); @@ -138,13 +138,13 @@ public static NLMInitalizeRoutingTablePortMapping staticParse(ReadBuffer readBuf byte[] portInfo = readBuffer.readByteArray("portInfo", Math.toIntExact(portInfoLength)); - readBuffer.closeContext("NLMInitalizeRoutingTablePortMapping"); + readBuffer.closeContext("NLMInitializeRoutingTablePortMapping"); // Create the instance - NLMInitalizeRoutingTablePortMapping _nLMInitalizeRoutingTablePortMapping; - _nLMInitalizeRoutingTablePortMapping = - new NLMInitalizeRoutingTablePortMapping( + NLMInitializeRoutingTablePortMapping _nLMInitializeRoutingTablePortMapping; + _nLMInitializeRoutingTablePortMapping = + new NLMInitializeRoutingTablePortMapping( destinationNetworkAddress, portId, portInfoLength, portInfo); - return _nLMInitalizeRoutingTablePortMapping; + return _nLMInitializeRoutingTablePortMapping; } @Override @@ -152,10 +152,10 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof NLMInitalizeRoutingTablePortMapping)) { + if (!(o instanceof NLMInitializeRoutingTablePortMapping)) { return false; } - NLMInitalizeRoutingTablePortMapping that = (NLMInitalizeRoutingTablePortMapping) o; + NLMInitializeRoutingTablePortMapping that = (NLMInitializeRoutingTablePortMapping) o; return (getDestinationNetworkAddress() == that.getDestinationNetworkAddress()) && (getPortId() == that.getPortId()) && (getPortInfoLength() == that.getPortInfoLength()) diff --git a/plc4py/plc4py/protocols/umas/readwrite/UmasPDUItem.py b/plc4py/plc4py/protocols/umas/readwrite/UmasPDUItem.py index 8184168e4a4..6f2fe3f3e51 100644 --- a/plc4py/plc4py/protocols/umas/readwrite/UmasPDUItem.py +++ b/plc4py/plc4py/protocols/umas/readwrite/UmasPDUItem.py @@ -274,7 +274,6 @@ def static_parse_context( builder = UmasPDUWriteVariableResponse.static_parse_builder( read_buffer, umas_request_function_key, byte_length ) - from plc4py.protocols.umas.readwrite.UmasPDUReadUnlocatedVariableResponse import ( UmasPDUReadUnlocatedVariableResponse, ) diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec index 17922a9a498..c5ab29cd9eb 100644 --- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec +++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec @@ -156,15 +156,15 @@ ['0x05' *RouterAvailableToNetwork [array uint 16 destinationNetworkAddresses length 'apduLength - 1'] ] - ['0x06' *InitalizeRoutingTable + ['0x06' *InitializeRoutingTable [simple uint 8 numberOfPorts ] - [array NLMInitalizeRoutingTablePortMapping + [array NLMInitializeRoutingTablePortMapping portMappings count 'numberOfPorts' ] ] - ['0x07' *InitalizeRoutingTableAck + ['0x07' *InitializeRoutingTableAck [simple uint 8 numberOfPorts ] - [array NLMInitalizeRoutingTablePortMapping + [array NLMInitializeRoutingTablePortMapping portMappings count 'numberOfPorts' ] ] @@ -250,7 +250,7 @@ ] ] -[type NLMInitalizeRoutingTablePortMapping +[type NLMInitializeRoutingTablePortMapping [simple uint 16 destinationNetworkAddress ] [simple uint 8 portId ] [simple uint 8 portInfoLength ]