github.com/koko1123/flow-go-1@v0.29.6/module/executiondatasync/execution_data/mock/downloader.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	flow "github.com/koko1123/flow-go-1/model/flow"
     9  	execution_data "github.com/koko1123/flow-go-1/module/executiondatasync/execution_data"
    10  
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // Downloader is an autogenerated mock type for the Downloader type
    15  type Downloader struct {
    16  	mock.Mock
    17  }
    18  
    19  // Done provides a mock function with given fields:
    20  func (_m *Downloader) Done() <-chan struct{} {
    21  	ret := _m.Called()
    22  
    23  	var r0 <-chan struct{}
    24  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    25  		r0 = rf()
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(<-chan struct{})
    29  		}
    30  	}
    31  
    32  	return r0
    33  }
    34  
    35  // Download provides a mock function with given fields: ctx, executionDataID
    36  func (_m *Downloader) Download(ctx context.Context, executionDataID flow.Identifier) (*execution_data.BlockExecutionData, error) {
    37  	ret := _m.Called(ctx, executionDataID)
    38  
    39  	var r0 *execution_data.BlockExecutionData
    40  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *execution_data.BlockExecutionData); ok {
    41  		r0 = rf(ctx, executionDataID)
    42  	} else {
    43  		if ret.Get(0) != nil {
    44  			r0 = ret.Get(0).(*execution_data.BlockExecutionData)
    45  		}
    46  	}
    47  
    48  	var r1 error
    49  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
    50  		r1 = rf(ctx, executionDataID)
    51  	} else {
    52  		r1 = ret.Error(1)
    53  	}
    54  
    55  	return r0, r1
    56  }
    57  
    58  // Ready provides a mock function with given fields:
    59  func (_m *Downloader) Ready() <-chan struct{} {
    60  	ret := _m.Called()
    61  
    62  	var r0 <-chan struct{}
    63  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    64  		r0 = rf()
    65  	} else {
    66  		if ret.Get(0) != nil {
    67  			r0 = ret.Get(0).(<-chan struct{})
    68  		}
    69  	}
    70  
    71  	return r0
    72  }
    73  
    74  type mockConstructorTestingTNewDownloader interface {
    75  	mock.TestingT
    76  	Cleanup(func())
    77  }
    78  
    79  // NewDownloader creates a new instance of Downloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    80  func NewDownloader(t mockConstructorTestingTNewDownloader) *Downloader {
    81  	mock := &Downloader{}
    82  	mock.Mock.Test(t)
    83  
    84  	t.Cleanup(func() { mock.AssertExpectations(t) })
    85  
    86  	return mock
    87  }