| /* |
| * 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 |
| } |
| |
| // SetPDUUserData provides a mock function with given fields: _a0 |
| func (_m *MockIPCI) SetPDUUserData(_a0 spi.Message) { |
| _m.Called(_a0) |
| } |
| |
| // MockIPCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' |
| type MockIPCI_SetPDUUserData_Call struct { |
| *mock.Call |
| } |
| |
| // SetPDUUserData is a helper method to define mock.On call |
| // - _a0 spi.Message |
| func (_e *MockIPCI_Expecter) SetPDUUserData(_a0 interface{}) *MockIPCI_SetPDUUserData_Call { |
| return &MockIPCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} |
| } |
| |
| func (_c *MockIPCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockIPCI_SetPDUUserData_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(spi.Message)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockIPCI_SetPDUUserData_Call) Return() *MockIPCI_SetPDUUserData_Call { |
| _c.Call.Return() |
| return _c |
| } |
| |
| func (_c *MockIPCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockIPCI_SetPDUUserData_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 |
| } |