// Code generated by mockery. DO NOT EDIT.

package l1infotreesync

import (
	context "context"

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

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

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

type L1InfoTreeSyncerMock_Expecter struct {
	mock *mock.Mock
}

func (_m *L1InfoTreeSyncerMock) EXPECT() *L1InfoTreeSyncerMock_Expecter {
	return &L1InfoTreeSyncerMock_Expecter{mock: &_m.Mock}
}

// GetInfoByGlobalExitRoot provides a mock function with given fields: ger
func (_m *L1InfoTreeSyncerMock) GetInfoByGlobalExitRoot(ger common.Hash) (*L1InfoTreeLeaf, error) {
	ret := _m.Called(ger)

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

	var r0 *L1InfoTreeLeaf
	var r1 error
	if rf, ok := ret.Get(0).(func(common.Hash) (*L1InfoTreeLeaf, error)); ok {
		return rf(ger)
	}
	if rf, ok := ret.Get(0).(func(common.Hash) *L1InfoTreeLeaf); ok {
		r0 = rf(ger)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*L1InfoTreeLeaf)
		}
	}

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

	return r0, r1
}

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

// GetInfoByGlobalExitRoot is a helper method to define mock.On call
//   - ger common.Hash
func (_e *L1InfoTreeSyncerMock_Expecter) GetInfoByGlobalExitRoot(ger interface{}) *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call {
	return &L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call{Call: _e.mock.On("GetInfoByGlobalExitRoot", ger)}
}

func (_c *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call) Run(run func(ger common.Hash)) *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(common.Hash))
	})
	return _c
}

func (_c *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call) Return(_a0 *L1InfoTreeLeaf, _a1 error) *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call) RunAndReturn(run func(common.Hash) (*L1InfoTreeLeaf, error)) *L1InfoTreeSyncerMock_GetInfoByGlobalExitRoot_Call {
	_c.Call.Return(run)
	return _c
}

// GetInfoByRoot provides a mock function with given fields: ger
func (_m *L1InfoTreeSyncerMock) GetInfoByRoot(ger common.Hash) (*L1InfoTreeLeaf, error) {
	ret := _m.Called(ger)

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

	var r0 *L1InfoTreeLeaf
	var r1 error
	if rf, ok := ret.Get(0).(func(common.Hash) (*L1InfoTreeLeaf, error)); ok {
		return rf(ger)
	}
	if rf, ok := ret.Get(0).(func(common.Hash) *L1InfoTreeLeaf); ok {
		r0 = rf(ger)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*L1InfoTreeLeaf)
		}
	}

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

	return r0, r1
}

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

// GetInfoByRoot is a helper method to define mock.On call
//   - ger common.Hash
func (_e *L1InfoTreeSyncerMock_Expecter) GetInfoByRoot(ger interface{}) *L1InfoTreeSyncerMock_GetInfoByRoot_Call {
	return &L1InfoTreeSyncerMock_GetInfoByRoot_Call{Call: _e.mock.On("GetInfoByRoot", ger)}
}

func (_c *L1InfoTreeSyncerMock_GetInfoByRoot_Call) Run(run func(ger common.Hash)) *L1InfoTreeSyncerMock_GetInfoByRoot_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(common.Hash))
	})
	return _c
}

func (_c *L1InfoTreeSyncerMock_GetInfoByRoot_Call) Return(_a0 *L1InfoTreeLeaf, _a1 error) *L1InfoTreeSyncerMock_GetInfoByRoot_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeSyncerMock_GetInfoByRoot_Call) RunAndReturn(run func(common.Hash) (*L1InfoTreeLeaf, error)) *L1InfoTreeSyncerMock_GetInfoByRoot_Call {
	_c.Call.Return(run)
	return _c
}

// GetLatestL1InfoLeaf provides a mock function with given fields: ctx
func (_m *L1InfoTreeSyncerMock) GetLatestL1InfoLeaf(ctx context.Context) (*L1InfoTreeLeaf, error) {
	ret := _m.Called(ctx)

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

	var r0 *L1InfoTreeLeaf
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (*L1InfoTreeLeaf, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) *L1InfoTreeLeaf); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*L1InfoTreeLeaf)
		}
	}

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

	return r0, r1
}

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

// GetLatestL1InfoLeaf is a helper method to define mock.On call
//   - ctx context.Context
func (_e *L1InfoTreeSyncerMock_Expecter) GetLatestL1InfoLeaf(ctx interface{}) *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call {
	return &L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call{Call: _e.mock.On("GetLatestL1InfoLeaf", ctx)}
}

func (_c *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call) Run(run func(ctx context.Context)) *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call) Return(_a0 *L1InfoTreeLeaf, _a1 error) *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call) RunAndReturn(run func(context.Context) (*L1InfoTreeLeaf, error)) *L1InfoTreeSyncerMock_GetLatestL1InfoLeaf_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
