github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/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/ari-anchor/sei-tendermint/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 // Status provides a mock function with given fields: ctx 35 func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { 36 ret := _m.Called(ctx) 37 38 var r0 *types.LightClientInfo 39 if rf, ok := ret.Get(0).(func(context.Context) *types.LightClientInfo); ok { 40 r0 = rf(ctx) 41 } else { 42 if ret.Get(0) != nil { 43 r0 = ret.Get(0).(*types.LightClientInfo) 44 } 45 } 46 47 return r0 48 } 49 50 // TrustedLightBlock provides a mock function with given fields: height 51 func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { 52 ret := _m.Called(height) 53 54 var r0 *types.LightBlock 55 if rf, ok := ret.Get(0).(func(int64) *types.LightBlock); ok { 56 r0 = rf(height) 57 } else { 58 if ret.Get(0) != nil { 59 r0 = ret.Get(0).(*types.LightBlock) 60 } 61 } 62 63 var r1 error 64 if rf, ok := ret.Get(1).(func(int64) error); ok { 65 r1 = rf(height) 66 } else { 67 r1 = ret.Error(1) 68 } 69 70 return r0, r1 71 } 72 73 // Update provides a mock function with given fields: ctx, now 74 func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { 75 ret := _m.Called(ctx, now) 76 77 var r0 *types.LightBlock 78 if rf, ok := ret.Get(0).(func(context.Context, time.Time) *types.LightBlock); ok { 79 r0 = rf(ctx, now) 80 } else { 81 if ret.Get(0) != nil { 82 r0 = ret.Get(0).(*types.LightBlock) 83 } 84 } 85 86 var r1 error 87 if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { 88 r1 = rf(ctx, now) 89 } else { 90 r1 = ret.Error(1) 91 } 92 93 return r0, r1 94 } 95 96 // VerifyLightBlockAtHeight provides a mock function with given fields: ctx, height, now 97 func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { 98 ret := _m.Called(ctx, height, now) 99 100 var r0 *types.LightBlock 101 if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) *types.LightBlock); ok { 102 r0 = rf(ctx, height, now) 103 } else { 104 if ret.Get(0) != nil { 105 r0 = ret.Get(0).(*types.LightBlock) 106 } 107 } 108 109 var r1 error 110 if rf, ok := ret.Get(1).(func(context.Context, int64, time.Time) error); ok { 111 r1 = rf(ctx, height, now) 112 } else { 113 r1 = ret.Error(1) 114 } 115 116 return r0, r1 117 } 118 119 type mockConstructorTestingTNewLightClient interface { 120 mock.TestingT 121 Cleanup(func()) 122 } 123 124 // 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. 125 func NewLightClient(t mockConstructorTestingTNewLightClient) *LightClient { 126 mock := &LightClient{} 127 mock.Mock.Test(t) 128 129 t.Cleanup(func() { mock.AssertExpectations(t) }) 130 131 return mock 132 }