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