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

package mock_broadcaster

import (
	context "context"

	message "github.com/milvus-io/milvus/pkg/v3/streaming/util/message"
	mock "github.com/stretchr/testify/mock"

	types "github.com/milvus-io/milvus/pkg/v3/streaming/util/types"
)

// MockAppendOperator is an autogenerated mock type for the AppendOperator type
type MockAppendOperator struct {
	mock.Mock
}

type MockAppendOperator_Expecter struct {
	mock *mock.Mock
}

func (_m *MockAppendOperator) EXPECT() *MockAppendOperator_Expecter {
	return &MockAppendOperator_Expecter{mock: &_m.Mock}
}

// AppendMessages provides a mock function with given fields: ctx, msgs
func (_m *MockAppendOperator) AppendMessages(ctx context.Context, msgs ...message.MutableMessage) types.AppendResponses {
	_va := make([]interface{}, len(msgs))
	for _i := range msgs {
		_va[_i] = msgs[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for AppendMessages")
	}

	var r0 types.AppendResponses
	if rf, ok := ret.Get(0).(func(context.Context, ...message.MutableMessage) types.AppendResponses); ok {
		r0 = rf(ctx, msgs...)
	} else {
		r0 = ret.Get(0).(types.AppendResponses)
	}

	return r0
}

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

// AppendMessages is a helper method to define mock.On call
//   - ctx context.Context
//   - msgs ...message.MutableMessage
func (_e *MockAppendOperator_Expecter) AppendMessages(ctx interface{}, msgs ...interface{}) *MockAppendOperator_AppendMessages_Call {
	return &MockAppendOperator_AppendMessages_Call{Call: _e.mock.On("AppendMessages",
		append([]interface{}{ctx}, msgs...)...)}
}

func (_c *MockAppendOperator_AppendMessages_Call) Run(run func(ctx context.Context, msgs ...message.MutableMessage)) *MockAppendOperator_AppendMessages_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]message.MutableMessage, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(message.MutableMessage)
			}
		}
		run(args[0].(context.Context), variadicArgs...)
	})
	return _c
}

func (_c *MockAppendOperator_AppendMessages_Call) Return(_a0 types.AppendResponses) *MockAppendOperator_AppendMessages_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockAppendOperator_AppendMessages_Call) RunAndReturn(run func(context.Context, ...message.MutableMessage) types.AppendResponses) *MockAppendOperator_AppendMessages_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
