github.com/koko1123/flow-go-1@v0.29.6/engine/access/mock/execution_api_server.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  	execution "github.com/onflow/flow/protobuf/go/flow/execution"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // ExecutionAPIServer is an autogenerated mock type for the ExecutionAPIServer type
    13  type ExecutionAPIServer struct {
    14  	mock.Mock
    15  }
    16  
    17  // ExecuteScriptAtBlockID provides a mock function with given fields: _a0, _a1
    18  func (_m *ExecutionAPIServer) ExecuteScriptAtBlockID(_a0 context.Context, _a1 *execution.ExecuteScriptAtBlockIDRequest) (*execution.ExecuteScriptAtBlockIDResponse, error) {
    19  	ret := _m.Called(_a0, _a1)
    20  
    21  	var r0 *execution.ExecuteScriptAtBlockIDResponse
    22  	if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest) *execution.ExecuteScriptAtBlockIDResponse); ok {
    23  		r0 = rf(_a0, _a1)
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(*execution.ExecuteScriptAtBlockIDResponse)
    27  		}
    28  	}
    29  
    30  	var r1 error
    31  	if rf, ok := ret.Get(1).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest) error); ok {
    32  		r1 = rf(_a0, _a1)
    33  	} else {
    34  		r1 = ret.Error(1)
    35  	}
    36  
    37  	return r0, r1
    38  }
    39  
    40  // GetAccountAtBlockID provides a mock function with given fields: _a0, _a1
    41  func (_m *ExecutionAPIServer) GetAccountAtBlockID(_a0 context.Context, _a1 *execution.GetAccountAtBlockIDRequest) (*execution.GetAccountAtBlockIDResponse, error) {
    42  	ret := _m.Called(_a0, _a1)
    43  
    44  	var r0 *execution.GetAccountAtBlockIDResponse
    45  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest) *execution.GetAccountAtBlockIDResponse); ok {
    46  		r0 = rf(_a0, _a1)
    47  	} else {
    48  		if ret.Get(0) != nil {
    49  			r0 = ret.Get(0).(*execution.GetAccountAtBlockIDResponse)
    50  		}
    51  	}
    52  
    53  	var r1 error
    54  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetAccountAtBlockIDRequest) error); ok {
    55  		r1 = rf(_a0, _a1)
    56  	} else {
    57  		r1 = ret.Error(1)
    58  	}
    59  
    60  	return r0, r1
    61  }
    62  
    63  // GetBlockHeaderByID provides a mock function with given fields: _a0, _a1
    64  func (_m *ExecutionAPIServer) GetBlockHeaderByID(_a0 context.Context, _a1 *execution.GetBlockHeaderByIDRequest) (*execution.BlockHeaderResponse, error) {
    65  	ret := _m.Called(_a0, _a1)
    66  
    67  	var r0 *execution.BlockHeaderResponse
    68  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest) *execution.BlockHeaderResponse); ok {
    69  		r0 = rf(_a0, _a1)
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(*execution.BlockHeaderResponse)
    73  		}
    74  	}
    75  
    76  	var r1 error
    77  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetBlockHeaderByIDRequest) error); ok {
    78  		r1 = rf(_a0, _a1)
    79  	} else {
    80  		r1 = ret.Error(1)
    81  	}
    82  
    83  	return r0, r1
    84  }
    85  
    86  // GetEventsForBlockIDs provides a mock function with given fields: _a0, _a1
    87  func (_m *ExecutionAPIServer) GetEventsForBlockIDs(_a0 context.Context, _a1 *execution.GetEventsForBlockIDsRequest) (*execution.GetEventsForBlockIDsResponse, error) {
    88  	ret := _m.Called(_a0, _a1)
    89  
    90  	var r0 *execution.GetEventsForBlockIDsResponse
    91  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest) *execution.GetEventsForBlockIDsResponse); ok {
    92  		r0 = rf(_a0, _a1)
    93  	} else {
    94  		if ret.Get(0) != nil {
    95  			r0 = ret.Get(0).(*execution.GetEventsForBlockIDsResponse)
    96  		}
    97  	}
    98  
    99  	var r1 error
   100  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetEventsForBlockIDsRequest) error); ok {
   101  		r1 = rf(_a0, _a1)
   102  	} else {
   103  		r1 = ret.Error(1)
   104  	}
   105  
   106  	return r0, r1
   107  }
   108  
   109  // GetLatestBlockHeader provides a mock function with given fields: _a0, _a1
   110  func (_m *ExecutionAPIServer) GetLatestBlockHeader(_a0 context.Context, _a1 *execution.GetLatestBlockHeaderRequest) (*execution.BlockHeaderResponse, error) {
   111  	ret := _m.Called(_a0, _a1)
   112  
   113  	var r0 *execution.BlockHeaderResponse
   114  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest) *execution.BlockHeaderResponse); ok {
   115  		r0 = rf(_a0, _a1)
   116  	} else {
   117  		if ret.Get(0) != nil {
   118  			r0 = ret.Get(0).(*execution.BlockHeaderResponse)
   119  		}
   120  	}
   121  
   122  	var r1 error
   123  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetLatestBlockHeaderRequest) error); ok {
   124  		r1 = rf(_a0, _a1)
   125  	} else {
   126  		r1 = ret.Error(1)
   127  	}
   128  
   129  	return r0, r1
   130  }
   131  
   132  // GetRegisterAtBlockID provides a mock function with given fields: _a0, _a1
   133  func (_m *ExecutionAPIServer) GetRegisterAtBlockID(_a0 context.Context, _a1 *execution.GetRegisterAtBlockIDRequest) (*execution.GetRegisterAtBlockIDResponse, error) {
   134  	ret := _m.Called(_a0, _a1)
   135  
   136  	var r0 *execution.GetRegisterAtBlockIDResponse
   137  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest) *execution.GetRegisterAtBlockIDResponse); ok {
   138  		r0 = rf(_a0, _a1)
   139  	} else {
   140  		if ret.Get(0) != nil {
   141  			r0 = ret.Get(0).(*execution.GetRegisterAtBlockIDResponse)
   142  		}
   143  	}
   144  
   145  	var r1 error
   146  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetRegisterAtBlockIDRequest) error); ok {
   147  		r1 = rf(_a0, _a1)
   148  	} else {
   149  		r1 = ret.Error(1)
   150  	}
   151  
   152  	return r0, r1
   153  }
   154  
   155  // GetTransactionResult provides a mock function with given fields: _a0, _a1
   156  func (_m *ExecutionAPIServer) GetTransactionResult(_a0 context.Context, _a1 *execution.GetTransactionResultRequest) (*execution.GetTransactionResultResponse, error) {
   157  	ret := _m.Called(_a0, _a1)
   158  
   159  	var r0 *execution.GetTransactionResultResponse
   160  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest) *execution.GetTransactionResultResponse); ok {
   161  		r0 = rf(_a0, _a1)
   162  	} else {
   163  		if ret.Get(0) != nil {
   164  			r0 = ret.Get(0).(*execution.GetTransactionResultResponse)
   165  		}
   166  	}
   167  
   168  	var r1 error
   169  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionResultRequest) error); ok {
   170  		r1 = rf(_a0, _a1)
   171  	} else {
   172  		r1 = ret.Error(1)
   173  	}
   174  
   175  	return r0, r1
   176  }
   177  
   178  // GetTransactionResultByIndex provides a mock function with given fields: _a0, _a1
   179  func (_m *ExecutionAPIServer) GetTransactionResultByIndex(_a0 context.Context, _a1 *execution.GetTransactionByIndexRequest) (*execution.GetTransactionResultResponse, error) {
   180  	ret := _m.Called(_a0, _a1)
   181  
   182  	var r0 *execution.GetTransactionResultResponse
   183  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest) *execution.GetTransactionResultResponse); ok {
   184  		r0 = rf(_a0, _a1)
   185  	} else {
   186  		if ret.Get(0) != nil {
   187  			r0 = ret.Get(0).(*execution.GetTransactionResultResponse)
   188  		}
   189  	}
   190  
   191  	var r1 error
   192  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionByIndexRequest) error); ok {
   193  		r1 = rf(_a0, _a1)
   194  	} else {
   195  		r1 = ret.Error(1)
   196  	}
   197  
   198  	return r0, r1
   199  }
   200  
   201  // GetTransactionResultsByBlockID provides a mock function with given fields: _a0, _a1
   202  func (_m *ExecutionAPIServer) GetTransactionResultsByBlockID(_a0 context.Context, _a1 *execution.GetTransactionsByBlockIDRequest) (*execution.GetTransactionResultsResponse, error) {
   203  	ret := _m.Called(_a0, _a1)
   204  
   205  	var r0 *execution.GetTransactionResultsResponse
   206  	if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest) *execution.GetTransactionResultsResponse); ok {
   207  		r0 = rf(_a0, _a1)
   208  	} else {
   209  		if ret.Get(0) != nil {
   210  			r0 = ret.Get(0).(*execution.GetTransactionResultsResponse)
   211  		}
   212  	}
   213  
   214  	var r1 error
   215  	if rf, ok := ret.Get(1).(func(context.Context, *execution.GetTransactionsByBlockIDRequest) error); ok {
   216  		r1 = rf(_a0, _a1)
   217  	} else {
   218  		r1 = ret.Error(1)
   219  	}
   220  
   221  	return r0, r1
   222  }
   223  
   224  // Ping provides a mock function with given fields: _a0, _a1
   225  func (_m *ExecutionAPIServer) Ping(_a0 context.Context, _a1 *execution.PingRequest) (*execution.PingResponse, error) {
   226  	ret := _m.Called(_a0, _a1)
   227  
   228  	var r0 *execution.PingResponse
   229  	if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest) *execution.PingResponse); ok {
   230  		r0 = rf(_a0, _a1)
   231  	} else {
   232  		if ret.Get(0) != nil {
   233  			r0 = ret.Get(0).(*execution.PingResponse)
   234  		}
   235  	}
   236  
   237  	var r1 error
   238  	if rf, ok := ret.Get(1).(func(context.Context, *execution.PingRequest) error); ok {
   239  		r1 = rf(_a0, _a1)
   240  	} else {
   241  		r1 = ret.Error(1)
   242  	}
   243  
   244  	return r0, r1
   245  }
   246  
   247  type mockConstructorTestingTNewExecutionAPIServer interface {
   248  	mock.TestingT
   249  	Cleanup(func())
   250  }
   251  
   252  // NewExecutionAPIServer creates a new instance of ExecutionAPIServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   253  func NewExecutionAPIServer(t mockConstructorTestingTNewExecutionAPIServer) *ExecutionAPIServer {
   254  	mock := &ExecutionAPIServer{}
   255  	mock.Mock.Test(t)
   256  
   257  	t.Cleanup(func() { mock.AssertExpectations(t) })
   258  
   259  	return mock
   260  }