// Code generated by mockery v2.40.1. DO NOT EDIT.

package mocks

import (
	common "github.com/hyperledger/fabric-protos-go-apiv2/common"
	mock "github.com/stretchr/testify/mock"
)

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

type BlockPuller_Expecter struct {
	mock *mock.Mock
}

func (_m *BlockPuller) EXPECT() *BlockPuller_Expecter {
	return &BlockPuller_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with given fields:
func (_m *BlockPuller) Close() {
	_m.Called()
}

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

// Close is a helper method to define mock.On call
func (_e *BlockPuller_Expecter) Close() *BlockPuller_Close_Call {
	return &BlockPuller_Close_Call{Call: _e.mock.On("Close")}
}

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

func (_c *BlockPuller_Close_Call) Return() *BlockPuller_Close_Call {
	_c.Call.Return()
	return _c
}

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

// HeightsByEndpoints provides a mock function with given fields:
func (_m *BlockPuller) HeightsByEndpoints() (map[string]uint64, string, error) {
	ret := _m.Called()

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

	var r0 map[string]uint64
	var r1 string
	var r2 error
	if rf, ok := ret.Get(0).(func() (map[string]uint64, string, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() map[string]uint64); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]uint64)
		}
	}

	if rf, ok := ret.Get(1).(func() string); ok {
		r1 = rf()
	} else {
		r1 = ret.Get(1).(string)
	}

	if rf, ok := ret.Get(2).(func() error); ok {
		r2 = rf()
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

// HeightsByEndpoints is a helper method to define mock.On call
func (_e *BlockPuller_Expecter) HeightsByEndpoints() *BlockPuller_HeightsByEndpoints_Call {
	return &BlockPuller_HeightsByEndpoints_Call{Call: _e.mock.On("HeightsByEndpoints")}
}

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

func (_c *BlockPuller_HeightsByEndpoints_Call) Return(_a0 map[string]uint64, _a1 string, _a2 error) *BlockPuller_HeightsByEndpoints_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

func (_c *BlockPuller_HeightsByEndpoints_Call) RunAndReturn(run func() (map[string]uint64, string, error)) *BlockPuller_HeightsByEndpoints_Call {
	_c.Call.Return(run)
	return _c
}

// PullBlock provides a mock function with given fields: seq
func (_m *BlockPuller) PullBlock(seq uint64) *common.Block {
	ret := _m.Called(seq)

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

	var r0 *common.Block
	if rf, ok := ret.Get(0).(func(uint64) *common.Block); ok {
		r0 = rf(seq)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*common.Block)
		}
	}

	return r0
}

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

// PullBlock is a helper method to define mock.On call
//   - seq uint64
func (_e *BlockPuller_Expecter) PullBlock(seq interface{}) *BlockPuller_PullBlock_Call {
	return &BlockPuller_PullBlock_Call{Call: _e.mock.On("PullBlock", seq)}
}

func (_c *BlockPuller_PullBlock_Call) Run(run func(seq uint64)) *BlockPuller_PullBlock_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(uint64))
	})
	return _c
}

func (_c *BlockPuller_PullBlock_Call) Return(_a0 *common.Block) *BlockPuller_PullBlock_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *BlockPuller_PullBlock_Call) RunAndReturn(run func(uint64) *common.Block) *BlockPuller_PullBlock_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
