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

package mocks

import (
	"github.com/aerospike/backup-go/models"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

// MockrecordWriter is an autogenerated mock type for the recordWriter type
type MockrecordWriter struct {
	mock.Mock
}

type MockrecordWriter_Expecter struct {
	mock *mock.Mock
}

func (_m *MockrecordWriter) EXPECT() *MockrecordWriter_Expecter {
	return &MockrecordWriter_Expecter{mock: &_m.Mock}
}

// close provides a mock function for the type MockrecordWriter
func (_mock *MockrecordWriter) close() error {
	ret := _mock.Called()

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func() error); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// close is a helper method to define mock.On call
func (_e *MockrecordWriter_Expecter) close() *MockrecordWriter_close_Call {
	return &MockrecordWriter_close_Call{Call: _e.mock.On("close")}
}

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

func (_c *MockrecordWriter_close_Call) Return(err error) *MockrecordWriter_close_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockrecordWriter_close_Call) RunAndReturn(run func() error) *MockrecordWriter_close_Call {
	_c.Call.Return(run)
	return _c
}

// writeRecord provides a mock function for the type MockrecordWriter
func (_mock *MockrecordWriter) writeRecord(record *models.Record) error {
	ret := _mock.Called(record)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*models.Record) error); ok {
		r0 = returnFunc(record)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// writeRecord is a helper method to define mock.On call
//   - record
func (_e *MockrecordWriter_Expecter) writeRecord(record interface{}) *MockrecordWriter_writeRecord_Call {
	return &MockrecordWriter_writeRecord_Call{Call: _e.mock.On("writeRecord", record)}
}

func (_c *MockrecordWriter_writeRecord_Call) Run(run func(record *models.Record)) *MockrecordWriter_writeRecord_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*models.Record))
	})
	return _c
}

func (_c *MockrecordWriter_writeRecord_Call) Return(err error) *MockrecordWriter_writeRecord_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockrecordWriter_writeRecord_Call) RunAndReturn(run func(record *models.Record) error) *MockrecordWriter_writeRecord_Call {
	_c.Call.Return(run)
	return _c
}
