github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/mock/blocks.go (about)

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