github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/transactions.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mempool
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/model/flow"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // Transactions is an autogenerated mock type for the Transactions type
    12  type Transactions struct {
    13  	mock.Mock
    14  }
    15  
    16  // Add provides a mock function with given fields: tx
    17  func (_m *Transactions) Add(tx *flow.TransactionBody) bool {
    18  	ret := _m.Called(tx)
    19  
    20  	var r0 bool
    21  	if rf, ok := ret.Get(0).(func(*flow.TransactionBody) bool); ok {
    22  		r0 = rf(tx)
    23  	} else {
    24  		r0 = ret.Get(0).(bool)
    25  	}
    26  
    27  	return r0
    28  }
    29  
    30  // All provides a mock function with given fields:
    31  func (_m *Transactions) All() []*flow.TransactionBody {
    32  	ret := _m.Called()
    33  
    34  	var r0 []*flow.TransactionBody
    35  	if rf, ok := ret.Get(0).(func() []*flow.TransactionBody); ok {
    36  		r0 = rf()
    37  	} else {
    38  		if ret.Get(0) != nil {
    39  			r0 = ret.Get(0).([]*flow.TransactionBody)
    40  		}
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // ByID provides a mock function with given fields: txID
    47  func (_m *Transactions) ByID(txID flow.Identifier) (*flow.TransactionBody, bool) {
    48  	ret := _m.Called(txID)
    49  
    50  	var r0 *flow.TransactionBody
    51  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.TransactionBody); ok {
    52  		r0 = rf(txID)
    53  	} else {
    54  		if ret.Get(0) != nil {
    55  			r0 = ret.Get(0).(*flow.TransactionBody)
    56  		}
    57  	}
    58  
    59  	var r1 bool
    60  	if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok {
    61  		r1 = rf(txID)
    62  	} else {
    63  		r1 = ret.Get(1).(bool)
    64  	}
    65  
    66  	return r0, r1
    67  }
    68  
    69  // Clear provides a mock function with given fields:
    70  func (_m *Transactions) Clear() {
    71  	_m.Called()
    72  }
    73  
    74  // Has provides a mock function with given fields: txID
    75  func (_m *Transactions) Has(txID flow.Identifier) bool {
    76  	ret := _m.Called(txID)
    77  
    78  	var r0 bool
    79  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    80  		r0 = rf(txID)
    81  	} else {
    82  		r0 = ret.Get(0).(bool)
    83  	}
    84  
    85  	return r0
    86  }
    87  
    88  // Remove provides a mock function with given fields: txID
    89  func (_m *Transactions) Remove(txID flow.Identifier) bool {
    90  	ret := _m.Called(txID)
    91  
    92  	var r0 bool
    93  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    94  		r0 = rf(txID)
    95  	} else {
    96  		r0 = ret.Get(0).(bool)
    97  	}
    98  
    99  	return r0
   100  }
   101  
   102  // Size provides a mock function with given fields:
   103  func (_m *Transactions) Size() uint {
   104  	ret := _m.Called()
   105  
   106  	var r0 uint
   107  	if rf, ok := ret.Get(0).(func() uint); ok {
   108  		r0 = rf()
   109  	} else {
   110  		r0 = ret.Get(0).(uint)
   111  	}
   112  
   113  	return r0
   114  }
   115  
   116  type mockConstructorTestingTNewTransactions interface {
   117  	mock.TestingT
   118  	Cleanup(func())
   119  }
   120  
   121  // NewTransactions creates a new instance of Transactions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   122  func NewTransactions(t mockConstructorTestingTNewTransactions) *Transactions {
   123  	mock := &Transactions{}
   124  	mock.Mock.Test(t)
   125  
   126  	t.Cleanup(func() { mock.AssertExpectations(t) })
   127  
   128  	return mock
   129  }