github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/persister.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import mock "github.com/stretchr/testify/mock"
     6  
     7  // Persister is an autogenerated mock type for the Persister type
     8  type Persister struct {
     9  	mock.Mock
    10  }
    11  
    12  // GetStarted provides a mock function with given fields:
    13  func (_m *Persister) GetStarted() (uint64, error) {
    14  	ret := _m.Called()
    15  
    16  	var r0 uint64
    17  	if rf, ok := ret.Get(0).(func() uint64); ok {
    18  		r0 = rf()
    19  	} else {
    20  		r0 = ret.Get(0).(uint64)
    21  	}
    22  
    23  	var r1 error
    24  	if rf, ok := ret.Get(1).(func() error); ok {
    25  		r1 = rf()
    26  	} else {
    27  		r1 = ret.Error(1)
    28  	}
    29  
    30  	return r0, r1
    31  }
    32  
    33  // GetVoted provides a mock function with given fields:
    34  func (_m *Persister) GetVoted() (uint64, error) {
    35  	ret := _m.Called()
    36  
    37  	var r0 uint64
    38  	if rf, ok := ret.Get(0).(func() uint64); ok {
    39  		r0 = rf()
    40  	} else {
    41  		r0 = ret.Get(0).(uint64)
    42  	}
    43  
    44  	var r1 error
    45  	if rf, ok := ret.Get(1).(func() error); ok {
    46  		r1 = rf()
    47  	} else {
    48  		r1 = ret.Error(1)
    49  	}
    50  
    51  	return r0, r1
    52  }
    53  
    54  // PutStarted provides a mock function with given fields: view
    55  func (_m *Persister) PutStarted(view uint64) error {
    56  	ret := _m.Called(view)
    57  
    58  	var r0 error
    59  	if rf, ok := ret.Get(0).(func(uint64) error); ok {
    60  		r0 = rf(view)
    61  	} else {
    62  		r0 = ret.Error(0)
    63  	}
    64  
    65  	return r0
    66  }
    67  
    68  // PutVoted provides a mock function with given fields: view
    69  func (_m *Persister) PutVoted(view uint64) error {
    70  	ret := _m.Called(view)
    71  
    72  	var r0 error
    73  	if rf, ok := ret.Get(0).(func(uint64) error); ok {
    74  		r0 = rf(view)
    75  	} else {
    76  		r0 = ret.Error(0)
    77  	}
    78  
    79  	return r0
    80  }
    81  
    82  type mockConstructorTestingTNewPersister interface {
    83  	mock.TestingT
    84  	Cleanup(func())
    85  }
    86  
    87  // NewPersister creates a new instance of Persister. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    88  func NewPersister(t mockConstructorTestingTNewPersister) *Persister {
    89  	mock := &Persister{}
    90  	mock.Mock.Test(t)
    91  
    92  	t.Cleanup(func() { mock.AssertExpectations(t) })
    93  
    94  	return mock
    95  }