// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	context "context"

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

	l2gersync "github.com/agglayer/aggkit/l2gersync"

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

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

type ChainGERReader_Expecter struct {
	mock *mock.Mock
}

func (_m *ChainGERReader) EXPECT() *ChainGERReader_Expecter {
	return &ChainGERReader_Expecter{mock: &_m.Mock}
}

// GetInjectedGERsForRange provides a mock function with given fields: ctx, fromBlock, toBlock
func (_m *ChainGERReader) GetInjectedGERsForRange(ctx context.Context, fromBlock uint64, toBlock uint64) (map[common.Hash]l2gersync.GlobalExitRootInfo, error) {
	ret := _m.Called(ctx, fromBlock, toBlock)

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

	var r0 map[common.Hash]l2gersync.GlobalExitRootInfo
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) (map[common.Hash]l2gersync.GlobalExitRootInfo, error)); ok {
		return rf(ctx, fromBlock, toBlock)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) map[common.Hash]l2gersync.GlobalExitRootInfo); ok {
		r0 = rf(ctx, fromBlock, toBlock)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[common.Hash]l2gersync.GlobalExitRootInfo)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64, uint64) error); ok {
		r1 = rf(ctx, fromBlock, toBlock)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetInjectedGERsForRange is a helper method to define mock.On call
//   - ctx context.Context
//   - fromBlock uint64
//   - toBlock uint64
func (_e *ChainGERReader_Expecter) GetInjectedGERsForRange(ctx interface{}, fromBlock interface{}, toBlock interface{}) *ChainGERReader_GetInjectedGERsForRange_Call {
	return &ChainGERReader_GetInjectedGERsForRange_Call{Call: _e.mock.On("GetInjectedGERsForRange", ctx, fromBlock, toBlock)}
}

func (_c *ChainGERReader_GetInjectedGERsForRange_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock uint64)) *ChainGERReader_GetInjectedGERsForRange_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(uint64), args[2].(uint64))
	})
	return _c
}

func (_c *ChainGERReader_GetInjectedGERsForRange_Call) Return(_a0 map[common.Hash]l2gersync.GlobalExitRootInfo, _a1 error) *ChainGERReader_GetInjectedGERsForRange_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *ChainGERReader_GetInjectedGERsForRange_Call) RunAndReturn(run func(context.Context, uint64, uint64) (map[common.Hash]l2gersync.GlobalExitRootInfo, error)) *ChainGERReader_GetInjectedGERsForRange_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
