github.com/koko1123/flow-go-1@v0.29.6/storage/mock/execution_results.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	storage "github.com/koko1123/flow-go-1/storage"
    10  
    11  	transaction "github.com/koko1123/flow-go-1/storage/badger/transaction"
    12  )
    13  
    14  // ExecutionResults is an autogenerated mock type for the ExecutionResults type
    15  type ExecutionResults struct {
    16  	mock.Mock
    17  }
    18  
    19  // BatchIndex provides a mock function with given fields: blockID, resultID, batch
    20  func (_m *ExecutionResults) BatchIndex(blockID flow.Identifier, resultID flow.Identifier, batch storage.BatchStorage) error {
    21  	ret := _m.Called(blockID, resultID, batch)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier, storage.BatchStorage) error); ok {
    25  		r0 = rf(blockID, resultID, batch)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // BatchRemoveIndexByBlockID provides a mock function with given fields: blockID, batch
    34  func (_m *ExecutionResults) BatchRemoveIndexByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error {
    35  	ret := _m.Called(blockID, batch)
    36  
    37  	var r0 error
    38  	if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok {
    39  		r0 = rf(blockID, batch)
    40  	} else {
    41  		r0 = ret.Error(0)
    42  	}
    43  
    44  	return r0
    45  }
    46  
    47  // BatchStore provides a mock function with given fields: result, batch
    48  func (_m *ExecutionResults) BatchStore(result *flow.ExecutionResult, batch storage.BatchStorage) error {
    49  	ret := _m.Called(result, batch)
    50  
    51  	var r0 error
    52  	if rf, ok := ret.Get(0).(func(*flow.ExecutionResult, storage.BatchStorage) error); ok {
    53  		r0 = rf(result, batch)
    54  	} else {
    55  		r0 = ret.Error(0)
    56  	}
    57  
    58  	return r0
    59  }
    60  
    61  // ByBlockID provides a mock function with given fields: blockID
    62  func (_m *ExecutionResults) ByBlockID(blockID flow.Identifier) (*flow.ExecutionResult, error) {
    63  	ret := _m.Called(blockID)
    64  
    65  	var r0 *flow.ExecutionResult
    66  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ExecutionResult); ok {
    67  		r0 = rf(blockID)
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).(*flow.ExecutionResult)
    71  		}
    72  	}
    73  
    74  	var r1 error
    75  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    76  		r1 = rf(blockID)
    77  	} else {
    78  		r1 = ret.Error(1)
    79  	}
    80  
    81  	return r0, r1
    82  }
    83  
    84  // ByID provides a mock function with given fields: resultID
    85  func (_m *ExecutionResults) ByID(resultID flow.Identifier) (*flow.ExecutionResult, error) {
    86  	ret := _m.Called(resultID)
    87  
    88  	var r0 *flow.ExecutionResult
    89  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ExecutionResult); ok {
    90  		r0 = rf(resultID)
    91  	} else {
    92  		if ret.Get(0) != nil {
    93  			r0 = ret.Get(0).(*flow.ExecutionResult)
    94  		}
    95  	}
    96  
    97  	var r1 error
    98  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    99  		r1 = rf(resultID)
   100  	} else {
   101  		r1 = ret.Error(1)
   102  	}
   103  
   104  	return r0, r1
   105  }
   106  
   107  // ByIDTx provides a mock function with given fields: resultID
   108  func (_m *ExecutionResults) ByIDTx(resultID flow.Identifier) func(*transaction.Tx) (*flow.ExecutionResult, error) {
   109  	ret := _m.Called(resultID)
   110  
   111  	var r0 func(*transaction.Tx) (*flow.ExecutionResult, error)
   112  	if rf, ok := ret.Get(0).(func(flow.Identifier) func(*transaction.Tx) (*flow.ExecutionResult, error)); ok {
   113  		r0 = rf(resultID)
   114  	} else {
   115  		if ret.Get(0) != nil {
   116  			r0 = ret.Get(0).(func(*transaction.Tx) (*flow.ExecutionResult, error))
   117  		}
   118  	}
   119  
   120  	return r0
   121  }
   122  
   123  // ForceIndex provides a mock function with given fields: blockID, resultID
   124  func (_m *ExecutionResults) ForceIndex(blockID flow.Identifier, resultID flow.Identifier) error {
   125  	ret := _m.Called(blockID, resultID)
   126  
   127  	var r0 error
   128  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok {
   129  		r0 = rf(blockID, resultID)
   130  	} else {
   131  		r0 = ret.Error(0)
   132  	}
   133  
   134  	return r0
   135  }
   136  
   137  // Index provides a mock function with given fields: blockID, resultID
   138  func (_m *ExecutionResults) Index(blockID flow.Identifier, resultID flow.Identifier) error {
   139  	ret := _m.Called(blockID, resultID)
   140  
   141  	var r0 error
   142  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok {
   143  		r0 = rf(blockID, resultID)
   144  	} else {
   145  		r0 = ret.Error(0)
   146  	}
   147  
   148  	return r0
   149  }
   150  
   151  // Store provides a mock function with given fields: result
   152  func (_m *ExecutionResults) Store(result *flow.ExecutionResult) error {
   153  	ret := _m.Called(result)
   154  
   155  	var r0 error
   156  	if rf, ok := ret.Get(0).(func(*flow.ExecutionResult) error); ok {
   157  		r0 = rf(result)
   158  	} else {
   159  		r0 = ret.Error(0)
   160  	}
   161  
   162  	return r0
   163  }
   164  
   165  type mockConstructorTestingTNewExecutionResults interface {
   166  	mock.TestingT
   167  	Cleanup(func())
   168  }
   169  
   170  // NewExecutionResults creates a new instance of ExecutionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   171  func NewExecutionResults(t mockConstructorTestingTNewExecutionResults) *ExecutionResults {
   172  	mock := &ExecutionResults{}
   173  	mock.Mock.Test(t)
   174  
   175  	t.Cleanup(func() { mock.AssertExpectations(t) })
   176  
   177  	return mock
   178  }