// Code generated by mockery v2.32.4. DO NOT EDIT.

package syncmgr

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
)

// MockSerializer is an autogenerated mock type for the Serializer type
type MockSerializer struct {
	mock.Mock
}

type MockSerializer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockSerializer) EXPECT() *MockSerializer_Expecter {
	return &MockSerializer_Expecter{mock: &_m.Mock}
}

// EncodeBuffer provides a mock function with given fields: ctx, pack
func (_m *MockSerializer) EncodeBuffer(ctx context.Context, pack *SyncPack) (Task, error) {
	ret := _m.Called(ctx, pack)

	var r0 Task
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *SyncPack) (Task, error)); ok {
		return rf(ctx, pack)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *SyncPack) Task); ok {
		r0 = rf(ctx, pack)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(Task)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *SyncPack) error); ok {
		r1 = rf(ctx, pack)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSerializer_EncodeBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EncodeBuffer'
type MockSerializer_EncodeBuffer_Call struct {
	*mock.Call
}

// EncodeBuffer is a helper method to define mock.On call
//   - ctx context.Context
//   - pack *SyncPack
func (_e *MockSerializer_Expecter) EncodeBuffer(ctx interface{}, pack interface{}) *MockSerializer_EncodeBuffer_Call {
	return &MockSerializer_EncodeBuffer_Call{Call: _e.mock.On("EncodeBuffer", ctx, pack)}
}

func (_c *MockSerializer_EncodeBuffer_Call) Run(run func(ctx context.Context, pack *SyncPack)) *MockSerializer_EncodeBuffer_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*SyncPack))
	})
	return _c
}

func (_c *MockSerializer_EncodeBuffer_Call) Return(_a0 Task, _a1 error) *MockSerializer_EncodeBuffer_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockSerializer_EncodeBuffer_Call) RunAndReturn(run func(context.Context, *SyncPack) (Task, error)) *MockSerializer_EncodeBuffer_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockSerializer creates a new instance of MockSerializer. 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 NewMockSerializer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSerializer {
	mock := &MockSerializer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
