github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/blocks.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  // 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  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Block); ok {
    52  		r0 = rf(blockID)
    53  	} else {
    54  		if ret.Get(0) != nil {
    55  			r0 = ret.Get(0).(*flow.Block)
    56  		}
    57  	}
    58  
    59  	var r1 bool
    60  	if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok {
    61  		r1 = rf(blockID)
    62  	} else {
    63  		r1 = ret.Get(1).(bool)
    64  	}
    65  
    66  	return r0, r1
    67  }
    68  
    69  // Has provides a mock function with given fields: blockID
    70  func (_m *Blocks) Has(blockID flow.Identifier) bool {
    71  	ret := _m.Called(blockID)
    72  
    73  	var r0 bool
    74  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    75  		r0 = rf(blockID)
    76  	} else {
    77  		r0 = ret.Get(0).(bool)
    78  	}
    79  
    80  	return r0
    81  }
    82  
    83  // Hash provides a mock function with given fields:
    84  func (_m *Blocks) Hash() flow.Identifier {
    85  	ret := _m.Called()
    86  
    87  	var r0 flow.Identifier
    88  	if rf, ok := ret.Get(0).(func() flow.Identifier); ok {
    89  		r0 = rf()
    90  	} else {
    91  		if ret.Get(0) != nil {
    92  			r0 = ret.Get(0).(flow.Identifier)
    93  		}
    94  	}
    95  
    96  	return r0
    97  }
    98  
    99  // Remove provides a mock function with given fields: blockID
   100  func (_m *Blocks) Remove(blockID flow.Identifier) bool {
   101  	ret := _m.Called(blockID)
   102  
   103  	var r0 bool
   104  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
   105  		r0 = rf(blockID)
   106  	} else {
   107  		r0 = ret.Get(0).(bool)
   108  	}
   109  
   110  	return r0
   111  }
   112  
   113  // Size provides a mock function with given fields:
   114  func (_m *Blocks) Size() uint {
   115  	ret := _m.Called()
   116  
   117  	var r0 uint
   118  	if rf, ok := ret.Get(0).(func() uint); ok {
   119  		r0 = rf()
   120  	} else {
   121  		r0 = ret.Get(0).(uint)
   122  	}
   123  
   124  	return r0
   125  }
   126  
   127  type mockConstructorTestingTNewBlocks interface {
   128  	mock.TestingT
   129  	Cleanup(func())
   130  }
   131  
   132  // 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.
   133  func NewBlocks(t mockConstructorTestingTNewBlocks) *Blocks {
   134  	mock := &Blocks{}
   135  	mock.Mock.Test(t)
   136  
   137  	t.Cleanup(func() { mock.AssertExpectations(t) })
   138  
   139  	return mock
   140  }