github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/access/subscription/mock/block_tracker.go (about)

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