github.com/koko1123/flow-go-1@v0.29.6/storage/mock/transaction_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  
    12  // TransactionResults is an autogenerated mock type for the TransactionResults type
    13  type TransactionResults struct {
    14  	mock.Mock
    15  }
    16  
    17  // BatchStore provides a mock function with given fields: blockID, transactionResults, batch
    18  func (_m *TransactionResults) BatchStore(blockID flow.Identifier, transactionResults []flow.TransactionResult, batch storage.BatchStorage) error {
    19  	ret := _m.Called(blockID, transactionResults, batch)
    20  
    21  	var r0 error
    22  	if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.TransactionResult, storage.BatchStorage) error); ok {
    23  		r0 = rf(blockID, transactionResults, batch)
    24  	} else {
    25  		r0 = ret.Error(0)
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // ByBlockID provides a mock function with given fields: id
    32  func (_m *TransactionResults) ByBlockID(id flow.Identifier) ([]flow.TransactionResult, error) {
    33  	ret := _m.Called(id)
    34  
    35  	var r0 []flow.TransactionResult
    36  	if rf, ok := ret.Get(0).(func(flow.Identifier) []flow.TransactionResult); ok {
    37  		r0 = rf(id)
    38  	} else {
    39  		if ret.Get(0) != nil {
    40  			r0 = ret.Get(0).([]flow.TransactionResult)
    41  		}
    42  	}
    43  
    44  	var r1 error
    45  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    46  		r1 = rf(id)
    47  	} else {
    48  		r1 = ret.Error(1)
    49  	}
    50  
    51  	return r0, r1
    52  }
    53  
    54  // ByBlockIDTransactionID provides a mock function with given fields: blockID, transactionID
    55  func (_m *TransactionResults) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) (*flow.TransactionResult, error) {
    56  	ret := _m.Called(blockID, transactionID)
    57  
    58  	var r0 *flow.TransactionResult
    59  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) *flow.TransactionResult); ok {
    60  		r0 = rf(blockID, transactionID)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).(*flow.TransactionResult)
    64  		}
    65  	}
    66  
    67  	var r1 error
    68  	if rf, ok := ret.Get(1).(func(flow.Identifier, flow.Identifier) error); ok {
    69  		r1 = rf(blockID, transactionID)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // ByBlockIDTransactionIndex provides a mock function with given fields: blockID, txIndex
    78  func (_m *TransactionResults) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) (*flow.TransactionResult, error) {
    79  	ret := _m.Called(blockID, txIndex)
    80  
    81  	var r0 *flow.TransactionResult
    82  	if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) *flow.TransactionResult); ok {
    83  		r0 = rf(blockID, txIndex)
    84  	} else {
    85  		if ret.Get(0) != nil {
    86  			r0 = ret.Get(0).(*flow.TransactionResult)
    87  		}
    88  	}
    89  
    90  	var r1 error
    91  	if rf, ok := ret.Get(1).(func(flow.Identifier, uint32) error); ok {
    92  		r1 = rf(blockID, txIndex)
    93  	} else {
    94  		r1 = ret.Error(1)
    95  	}
    96  
    97  	return r0, r1
    98  }
    99  
   100  type mockConstructorTestingTNewTransactionResults interface {
   101  	mock.TestingT
   102  	Cleanup(func())
   103  }
   104  
   105  // NewTransactionResults creates a new instance of TransactionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   106  func NewTransactionResults(t mockConstructorTestingTNewTransactionResults) *TransactionResults {
   107  	mock := &TransactionResults{}
   108  	mock.Mock.Test(t)
   109  
   110  	t.Cleanup(func() { mock.AssertExpectations(t) })
   111  
   112  	return mock
   113  }