| /* |
| * 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.28.2. DO NOT EDIT. |
| |
| package model |
| |
| import ( |
| context "context" |
| |
| utils "github.com/apache/plc4x/plc4go/spi/utils" |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // MockDefaultPlcSubscriptionEventRequirements is an autogenerated mock type for the DefaultPlcSubscriptionEventRequirements type |
| type MockDefaultPlcSubscriptionEventRequirements struct { |
| mock.Mock |
| } |
| |
| type MockDefaultPlcSubscriptionEventRequirements_Expecter struct { |
| mock *mock.Mock |
| } |
| |
| func (_m *MockDefaultPlcSubscriptionEventRequirements) EXPECT() *MockDefaultPlcSubscriptionEventRequirements_Expecter { |
| return &MockDefaultPlcSubscriptionEventRequirements_Expecter{mock: &_m.Mock} |
| } |
| |
| // GetAddress provides a mock function with given fields: name |
| func (_m *MockDefaultPlcSubscriptionEventRequirements) GetAddress(name string) string { |
| ret := _m.Called(name) |
| |
| var r0 string |
| if rf, ok := ret.Get(0).(func(string) string); ok { |
| r0 = rf(name) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| return r0 |
| } |
| |
| // MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress' |
| type MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call struct { |
| *mock.Call |
| } |
| |
| // GetAddress is a helper method to define mock.On call |
| // - name string |
| func (_e *MockDefaultPlcSubscriptionEventRequirements_Expecter) GetAddress(name interface{}) *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call { |
| return &MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call{Call: _e.mock.On("GetAddress", name)} |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call) Run(run func(name string)) *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(string)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call) Return(_a0 string) *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call) RunAndReturn(run func(string) string) *MockDefaultPlcSubscriptionEventRequirements_GetAddress_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // Serialize provides a mock function with given fields: |
| func (_m *MockDefaultPlcSubscriptionEventRequirements) Serialize() ([]byte, error) { |
| ret := _m.Called() |
| |
| 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 { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]byte) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func() error); ok { |
| r1 = rf() |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // MockDefaultPlcSubscriptionEventRequirements_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' |
| type MockDefaultPlcSubscriptionEventRequirements_Serialize_Call struct { |
| *mock.Call |
| } |
| |
| // Serialize is a helper method to define mock.On call |
| func (_e *MockDefaultPlcSubscriptionEventRequirements_Expecter) Serialize() *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call { |
| return &MockDefaultPlcSubscriptionEventRequirements_Serialize_Call{Call: _e.mock.On("Serialize")} |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call) Run(run func()) *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run() |
| }) |
| return _c |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call) Return(_a0 []byte, _a1 error) *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call { |
| _c.Call.Return(_a0, _a1) |
| return _c |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockDefaultPlcSubscriptionEventRequirements_Serialize_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| // SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer |
| func (_m *MockDefaultPlcSubscriptionEventRequirements) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { |
| ret := _m.Called(ctx, writeBuffer) |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { |
| r0 = rf(ctx, writeBuffer) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' |
| type MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call struct { |
| *mock.Call |
| } |
| |
| // SerializeWithWriteBuffer is a helper method to define mock.On call |
| // - ctx context.Context |
| // - writeBuffer utils.WriteBuffer |
| func (_e *MockDefaultPlcSubscriptionEventRequirements_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call { |
| return &MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call { |
| _c.Call.Run(func(args mock.Arguments) { |
| run(args[0].(context.Context), args[1].(utils.WriteBuffer)) |
| }) |
| return _c |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call { |
| _c.Call.Return(_a0) |
| return _c |
| } |
| |
| func (_c *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockDefaultPlcSubscriptionEventRequirements_SerializeWithWriteBuffer_Call { |
| _c.Call.Return(run) |
| return _c |
| } |
| |
| type mockConstructorTestingTNewMockDefaultPlcSubscriptionEventRequirements interface { |
| mock.TestingT |
| Cleanup(func()) |
| } |
| |
| // NewMockDefaultPlcSubscriptionEventRequirements creates a new instance of MockDefaultPlcSubscriptionEventRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| func NewMockDefaultPlcSubscriptionEventRequirements(t mockConstructorTestingTNewMockDefaultPlcSubscriptionEventRequirements) *MockDefaultPlcSubscriptionEventRequirements { |
| mock := &MockDefaultPlcSubscriptionEventRequirements{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |