// Code generated by mockery. DO NOT EDIT.

package mock_syncinterfaces

import (
	context "context"

	common "github.com/ethereum/go-ethereum/common"

	etherman "github.com/0xPolygonHermez/zkevm-node/etherman"

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

	pgx "github.com/jackc/pgx/v4"

	syncinterfaces "github.com/0xPolygonHermez/zkevm-node/synchronizer/common/syncinterfaces"
)

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

type BlockRangeProcessor_Expecter struct {
	mock *mock.Mock
}

func (_m *BlockRangeProcessor) EXPECT() *BlockRangeProcessor_Expecter {
	return &BlockRangeProcessor_Expecter{mock: &_m.Mock}
}

// ProcessBlockRange provides a mock function with given fields: ctx, blocks, order
func (_m *BlockRangeProcessor) ProcessBlockRange(ctx context.Context, blocks []etherman.Block, order map[common.Hash][]etherman.Order) error {
	ret := _m.Called(ctx, blocks, order)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, []etherman.Block, map[common.Hash][]etherman.Order) error); ok {
		r0 = rf(ctx, blocks, order)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// ProcessBlockRange is a helper method to define mock.On call
//   - ctx context.Context
//   - blocks []etherman.Block
//   - order map[common.Hash][]etherman.Order
func (_e *BlockRangeProcessor_Expecter) ProcessBlockRange(ctx interface{}, blocks interface{}, order interface{}) *BlockRangeProcessor_ProcessBlockRange_Call {
	return &BlockRangeProcessor_ProcessBlockRange_Call{Call: _e.mock.On("ProcessBlockRange", ctx, blocks, order)}
}

func (_c *BlockRangeProcessor_ProcessBlockRange_Call) Run(run func(ctx context.Context, blocks []etherman.Block, order map[common.Hash][]etherman.Order)) *BlockRangeProcessor_ProcessBlockRange_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].([]etherman.Block), args[2].(map[common.Hash][]etherman.Order))
	})
	return _c
}

func (_c *BlockRangeProcessor_ProcessBlockRange_Call) Return(_a0 error) *BlockRangeProcessor_ProcessBlockRange_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *BlockRangeProcessor_ProcessBlockRange_Call) RunAndReturn(run func(context.Context, []etherman.Block, map[common.Hash][]etherman.Order) error) *BlockRangeProcessor_ProcessBlockRange_Call {
	_c.Call.Return(run)
	return _c
}

// ProcessBlockRangeSingleDbTx provides a mock function with given fields: ctx, blocks, order, storeBlocks, dbTx
func (_m *BlockRangeProcessor) ProcessBlockRangeSingleDbTx(ctx context.Context, blocks []etherman.Block, order map[common.Hash][]etherman.Order, storeBlocks syncinterfaces.ProcessBlockRangeL1BlocksMode, dbTx pgx.Tx) error {
	ret := _m.Called(ctx, blocks, order, storeBlocks, dbTx)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, []etherman.Block, map[common.Hash][]etherman.Order, syncinterfaces.ProcessBlockRangeL1BlocksMode, pgx.Tx) error); ok {
		r0 = rf(ctx, blocks, order, storeBlocks, dbTx)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// ProcessBlockRangeSingleDbTx is a helper method to define mock.On call
//   - ctx context.Context
//   - blocks []etherman.Block
//   - order map[common.Hash][]etherman.Order
//   - storeBlocks syncinterfaces.ProcessBlockRangeL1BlocksMode
//   - dbTx pgx.Tx
func (_e *BlockRangeProcessor_Expecter) ProcessBlockRangeSingleDbTx(ctx interface{}, blocks interface{}, order interface{}, storeBlocks interface{}, dbTx interface{}) *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call {
	return &BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call{Call: _e.mock.On("ProcessBlockRangeSingleDbTx", ctx, blocks, order, storeBlocks, dbTx)}
}

func (_c *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call) Run(run func(ctx context.Context, blocks []etherman.Block, order map[common.Hash][]etherman.Order, storeBlocks syncinterfaces.ProcessBlockRangeL1BlocksMode, dbTx pgx.Tx)) *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].([]etherman.Block), args[2].(map[common.Hash][]etherman.Order), args[3].(syncinterfaces.ProcessBlockRangeL1BlocksMode), args[4].(pgx.Tx))
	})
	return _c
}

func (_c *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call) Return(_a0 error) *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call) RunAndReturn(run func(context.Context, []etherman.Block, map[common.Hash][]etherman.Order, syncinterfaces.ProcessBlockRangeL1BlocksMode, pgx.Tx) error) *BlockRangeProcessor_ProcessBlockRangeSingleDbTx_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
