blob: c4983e3e61ef78a9b38821f862a7db898bade505 [file] [log] [blame]
/*
* 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 utils
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockSerializable is an autogenerated mock type for the Serializable type
type MockSerializable struct {
mock.Mock
}
type MockSerializable_Expecter struct {
mock *mock.Mock
}
func (_m *MockSerializable) EXPECT() *MockSerializable_Expecter {
return &MockSerializable_Expecter{mock: &_m.Mock}
}
// Serialize provides a mock function with given fields:
func (_m *MockSerializable) 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
}
// MockSerializable_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize'
type MockSerializable_Serialize_Call struct {
*mock.Call
}
// Serialize is a helper method to define mock.On call
func (_e *MockSerializable_Expecter) Serialize() *MockSerializable_Serialize_Call {
return &MockSerializable_Serialize_Call{Call: _e.mock.On("Serialize")}
}
func (_c *MockSerializable_Serialize_Call) Run(run func()) *MockSerializable_Serialize_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockSerializable_Serialize_Call) Return(_a0 []byte, _a1 error) *MockSerializable_Serialize_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockSerializable_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockSerializable_Serialize_Call {
_c.Call.Return(run)
return _c
}
// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer
func (_m *MockSerializable) SerializeWithWriteBuffer(ctx context.Context, writeBuffer WriteBuffer) error {
ret := _m.Called(ctx, writeBuffer)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, WriteBuffer) error); ok {
r0 = rf(ctx, writeBuffer)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockSerializable_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer'
type MockSerializable_SerializeWithWriteBuffer_Call struct {
*mock.Call
}
// SerializeWithWriteBuffer is a helper method to define mock.On call
// - ctx context.Context
// - writeBuffer WriteBuffer
func (_e *MockSerializable_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockSerializable_SerializeWithWriteBuffer_Call {
return &MockSerializable_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)}
}
func (_c *MockSerializable_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer WriteBuffer)) *MockSerializable_SerializeWithWriteBuffer_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(WriteBuffer))
})
return _c
}
func (_c *MockSerializable_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockSerializable_SerializeWithWriteBuffer_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockSerializable_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, WriteBuffer) error) *MockSerializable_SerializeWithWriteBuffer_Call {
_c.Call.Return(run)
return _c
}
type mockConstructorTestingTNewMockSerializable interface {
mock.TestingT
Cleanup(func())
}
// NewMockSerializable creates a new instance of MockSerializable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockSerializable(t mockConstructorTestingTNewMockSerializable) *MockSerializable {
mock := &MockSerializable{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}