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

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