github.com/Finschia/ostracon@v1.1.5/light/rpc/mocks/light_client.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 10 time "time" 11 12 types "github.com/Finschia/ostracon/types" 13 ) 14 15 // LightClient is an autogenerated mock type for the LightClient type 16 type LightClient struct { 17 mock.Mock 18 } 19 20 // ChainID provides a mock function with given fields: 21 func (_m *LightClient) ChainID() string { 22 ret := _m.Called() 23 24 var r0 string 25 if rf, ok := ret.Get(0).(func() string); ok { 26 r0 = rf() 27 } else { 28 r0 = ret.Get(0).(string) 29 } 30 31 return r0 32 } 33 34 // TrustedLightBlock provides a mock function with given fields: height 35 func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { 36 ret := _m.Called(height) 37 38 var r0 *types.LightBlock 39 var r1 error 40 if rf, ok := ret.Get(0).(func(int64) (*types.LightBlock, error)); ok { 41 return rf(height) 42 } 43 if rf, ok := ret.Get(0).(func(int64) *types.LightBlock); ok { 44 r0 = rf(height) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(*types.LightBlock) 48 } 49 } 50 51 if rf, ok := ret.Get(1).(func(int64) error); ok { 52 r1 = rf(height) 53 } else { 54 r1 = ret.Error(1) 55 } 56 57 return r0, r1 58 } 59 60 // Update provides a mock function with given fields: ctx, now 61 func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { 62 ret := _m.Called(ctx, now) 63 64 var r0 *types.LightBlock 65 var r1 error 66 if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*types.LightBlock, error)); ok { 67 return rf(ctx, now) 68 } 69 if rf, ok := ret.Get(0).(func(context.Context, time.Time) *types.LightBlock); ok { 70 r0 = rf(ctx, now) 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(*types.LightBlock) 74 } 75 } 76 77 if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { 78 r1 = rf(ctx, now) 79 } else { 80 r1 = ret.Error(1) 81 } 82 83 return r0, r1 84 } 85 86 // VerifyLightBlockAtHeight provides a mock function with given fields: ctx, height, now 87 func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { 88 ret := _m.Called(ctx, height, now) 89 90 var r0 *types.LightBlock 91 var r1 error 92 if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) (*types.LightBlock, error)); ok { 93 return rf(ctx, height, now) 94 } 95 if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) *types.LightBlock); ok { 96 r0 = rf(ctx, height, now) 97 } else { 98 if ret.Get(0) != nil { 99 r0 = ret.Get(0).(*types.LightBlock) 100 } 101 } 102 103 if rf, ok := ret.Get(1).(func(context.Context, int64, time.Time) error); ok { 104 r1 = rf(ctx, height, now) 105 } else { 106 r1 = ret.Error(1) 107 } 108 109 return r0, r1 110 } 111 112 // NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 113 // The first argument is typically a *testing.T value. 114 func NewLightClient(t interface { 115 mock.TestingT 116 Cleanup(func()) 117 }) *LightClient { 118 mock := &LightClient{} 119 mock.Mock.Test(t) 120 121 t.Cleanup(func() { mock.AssertExpectations(t) }) 122 123 return mock 124 }