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

package mock_wal

import (
	message "github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
	mock "github.com/stretchr/testify/mock"

	wal "github.com/milvus-io/milvus/internal/streamingnode/server/wal"
)

// MockOpenerBuilder is an autogenerated mock type for the OpenerBuilder type
type MockOpenerBuilder struct {
	mock.Mock
}

type MockOpenerBuilder_Expecter struct {
	mock *mock.Mock
}

func (_m *MockOpenerBuilder) EXPECT() *MockOpenerBuilder_Expecter {
	return &MockOpenerBuilder_Expecter{mock: &_m.Mock}
}

// Build provides a mock function with no fields
func (_m *MockOpenerBuilder) Build() (wal.Opener, error) {
	ret := _m.Called()

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

	var r0 wal.Opener
	var r1 error
	if rf, ok := ret.Get(0).(func() (wal.Opener, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() wal.Opener); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(wal.Opener)
		}
	}

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Build is a helper method to define mock.On call
func (_e *MockOpenerBuilder_Expecter) Build() *MockOpenerBuilder_Build_Call {
	return &MockOpenerBuilder_Build_Call{Call: _e.mock.On("Build")}
}

func (_c *MockOpenerBuilder_Build_Call) Run(run func()) *MockOpenerBuilder_Build_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockOpenerBuilder_Build_Call) Return(_a0 wal.Opener, _a1 error) *MockOpenerBuilder_Build_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockOpenerBuilder_Build_Call) RunAndReturn(run func() (wal.Opener, error)) *MockOpenerBuilder_Build_Call {
	_c.Call.Return(run)
	return _c
}

// Name provides a mock function with no fields
func (_m *MockOpenerBuilder) Name() message.WALName {
	ret := _m.Called()

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

	var r0 message.WALName
	if rf, ok := ret.Get(0).(func() message.WALName); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(message.WALName)
	}

	return r0
}

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

// Name is a helper method to define mock.On call
func (_e *MockOpenerBuilder_Expecter) Name() *MockOpenerBuilder_Name_Call {
	return &MockOpenerBuilder_Name_Call{Call: _e.mock.On("Name")}
}

func (_c *MockOpenerBuilder_Name_Call) Run(run func()) *MockOpenerBuilder_Name_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockOpenerBuilder_Name_Call) Return(_a0 message.WALName) *MockOpenerBuilder_Name_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockOpenerBuilder_Name_Call) RunAndReturn(run func() message.WALName) *MockOpenerBuilder_Name_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
