// Code generated by mockery. DO NOT EDIT.

package sync

import (
	context "context"

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

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

type DownloaderMock_Expecter struct {
	mock *mock.Mock
}

func (_m *DownloaderMock) EXPECT() *DownloaderMock_Expecter {
	return &DownloaderMock_Expecter{mock: &_m.Mock}
}

// Download provides a mock function with given fields: ctx, fromBlock, downloadedCh
func (_m *DownloaderMock) Download(ctx context.Context, fromBlock uint64, downloadedCh chan EVMBlock) {
	_m.Called(ctx, fromBlock, downloadedCh)
}

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

// Download is a helper method to define mock.On call
//   - ctx context.Context
//   - fromBlock uint64
//   - downloadedCh chan EVMBlock
func (_e *DownloaderMock_Expecter) Download(ctx interface{}, fromBlock interface{}, downloadedCh interface{}) *DownloaderMock_Download_Call {
	return &DownloaderMock_Download_Call{Call: _e.mock.On("Download", ctx, fromBlock, downloadedCh)}
}

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

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

func (_c *DownloaderMock_Download_Call) RunAndReturn(run func(context.Context, uint64, chan EVMBlock)) *DownloaderMock_Download_Call {
	_c.Run(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *DownloaderMock_RuntimeData_Call) Return(_a0 RuntimeData, _a1 error) *DownloaderMock_RuntimeData_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

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

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

	return mock
}
