// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"github.com/aerospike/aerospike-client-go/v8"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

// MockRecordsetCloser is an autogenerated mock type for the RecordsetCloser type
type MockRecordsetCloser struct {
	mock.Mock
}

type MockRecordsetCloser_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRecordsetCloser) EXPECT() *MockRecordsetCloser_Expecter {
	return &MockRecordsetCloser_Expecter{mock: &_m.Mock}
}

// Close provides a mock function for the type MockRecordsetCloser
func (_mock *MockRecordsetCloser) Close(recordset *aerospike.Recordset) aerospike.Error {
	ret := _mock.Called(recordset)

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

	var r0 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.Recordset) aerospike.Error); ok {
		r0 = returnFunc(recordset)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(aerospike.Error)
		}
	}
	return r0
}

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

// Close is a helper method to define mock.On call
//   - recordset
func (_e *MockRecordsetCloser_Expecter) Close(recordset interface{}) *MockRecordsetCloser_Close_Call {
	return &MockRecordsetCloser_Close_Call{Call: _e.mock.On("Close", recordset)}
}

func (_c *MockRecordsetCloser_Close_Call) Run(run func(recordset *aerospike.Recordset)) *MockRecordsetCloser_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.Recordset))
	})
	return _c
}

func (_c *MockRecordsetCloser_Close_Call) Return(error aerospike.Error) *MockRecordsetCloser_Close_Call {
	_c.Call.Return(error)
	return _c
}

func (_c *MockRecordsetCloser_Close_Call) RunAndReturn(run func(recordset *aerospike.Recordset) aerospike.Error) *MockRecordsetCloser_Close_Call {
	_c.Call.Return(run)
	return _c
}
