github.com/koko1123/flow-go-1@v0.29.6/engine/access/state_stream/mock/api.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  	entities "github.com/onflow/flow/protobuf/go/flow/entities"
    10  
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // API is an autogenerated mock type for the API type
    15  type API struct {
    16  	mock.Mock
    17  }
    18  
    19  // GetExecutionDataByBlockID provides a mock function with given fields: ctx, blockID
    20  func (_m *API) GetExecutionDataByBlockID(ctx context.Context, blockID flow.Identifier) (*entities.BlockExecutionData, error) {
    21  	ret := _m.Called(ctx, blockID)
    22  
    23  	var r0 *entities.BlockExecutionData
    24  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *entities.BlockExecutionData); ok {
    25  		r0 = rf(ctx, blockID)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(*entities.BlockExecutionData)
    29  		}
    30  	}
    31  
    32  	var r1 error
    33  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
    34  		r1 = rf(ctx, blockID)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  type mockConstructorTestingTNewAPI interface {
    43  	mock.TestingT
    44  	Cleanup(func())
    45  }
    46  
    47  // NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    48  func NewAPI(t mockConstructorTestingTNewAPI) *API {
    49  	mock := &API{}
    50  	mock.Mock.Test(t)
    51  
    52  	t.Cleanup(func() { mock.AssertExpectations(t) })
    53  
    54  	return mock
    55  }