github.com/koko1123/flow-go-1@v0.29.6/module/mock/sdk_client_wrapper.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 context "context" 7 8 cadence "github.com/onflow/cadence" 9 10 flow "github.com/onflow/flow-go-sdk" 11 12 mock "github.com/stretchr/testify/mock" 13 ) 14 15 // SDKClientWrapper is an autogenerated mock type for the SDKClientWrapper type 16 type SDKClientWrapper struct { 17 mock.Mock 18 } 19 20 // ExecuteScriptAtBlockID provides a mock function with given fields: _a0, _a1, _a2, _a3 21 func (_m *SDKClientWrapper) ExecuteScriptAtBlockID(_a0 context.Context, _a1 flow.Identifier, _a2 []byte, _a3 []cadence.Value) (cadence.Value, error) { 22 ret := _m.Called(_a0, _a1, _a2, _a3) 23 24 var r0 cadence.Value 25 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, []cadence.Value) cadence.Value); ok { 26 r0 = rf(_a0, _a1, _a2, _a3) 27 } else { 28 if ret.Get(0) != nil { 29 r0 = ret.Get(0).(cadence.Value) 30 } 31 } 32 33 var r1 error 34 if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, []byte, []cadence.Value) error); ok { 35 r1 = rf(_a0, _a1, _a2, _a3) 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 // ExecuteScriptAtLatestBlock provides a mock function with given fields: _a0, _a1, _a2 44 func (_m *SDKClientWrapper) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 []byte, _a2 []cadence.Value) (cadence.Value, error) { 45 ret := _m.Called(_a0, _a1, _a2) 46 47 var r0 cadence.Value 48 if rf, ok := ret.Get(0).(func(context.Context, []byte, []cadence.Value) cadence.Value); ok { 49 r0 = rf(_a0, _a1, _a2) 50 } else { 51 if ret.Get(0) != nil { 52 r0 = ret.Get(0).(cadence.Value) 53 } 54 } 55 56 var r1 error 57 if rf, ok := ret.Get(1).(func(context.Context, []byte, []cadence.Value) error); ok { 58 r1 = rf(_a0, _a1, _a2) 59 } else { 60 r1 = ret.Error(1) 61 } 62 63 return r0, r1 64 } 65 66 // GetAccount provides a mock function with given fields: _a0, _a1 67 func (_m *SDKClientWrapper) GetAccount(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { 68 ret := _m.Called(_a0, _a1) 69 70 var r0 *flow.Account 71 if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok { 72 r0 = rf(_a0, _a1) 73 } else { 74 if ret.Get(0) != nil { 75 r0 = ret.Get(0).(*flow.Account) 76 } 77 } 78 79 var r1 error 80 if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok { 81 r1 = rf(_a0, _a1) 82 } else { 83 r1 = ret.Error(1) 84 } 85 86 return r0, r1 87 } 88 89 // GetAccountAtLatestBlock provides a mock function with given fields: _a0, _a1 90 func (_m *SDKClientWrapper) GetAccountAtLatestBlock(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { 91 ret := _m.Called(_a0, _a1) 92 93 var r0 *flow.Account 94 if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok { 95 r0 = rf(_a0, _a1) 96 } else { 97 if ret.Get(0) != nil { 98 r0 = ret.Get(0).(*flow.Account) 99 } 100 } 101 102 var r1 error 103 if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok { 104 r1 = rf(_a0, _a1) 105 } else { 106 r1 = ret.Error(1) 107 } 108 109 return r0, r1 110 } 111 112 // GetLatestBlock provides a mock function with given fields: _a0, _a1 113 func (_m *SDKClientWrapper) GetLatestBlock(_a0 context.Context, _a1 bool) (*flow.Block, error) { 114 ret := _m.Called(_a0, _a1) 115 116 var r0 *flow.Block 117 if rf, ok := ret.Get(0).(func(context.Context, bool) *flow.Block); ok { 118 r0 = rf(_a0, _a1) 119 } else { 120 if ret.Get(0) != nil { 121 r0 = ret.Get(0).(*flow.Block) 122 } 123 } 124 125 var r1 error 126 if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { 127 r1 = rf(_a0, _a1) 128 } else { 129 r1 = ret.Error(1) 130 } 131 132 return r0, r1 133 } 134 135 // GetTransactionResult provides a mock function with given fields: _a0, _a1 136 func (_m *SDKClientWrapper) GetTransactionResult(_a0 context.Context, _a1 flow.Identifier) (*flow.TransactionResult, error) { 137 ret := _m.Called(_a0, _a1) 138 139 var r0 *flow.TransactionResult 140 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.TransactionResult); ok { 141 r0 = rf(_a0, _a1) 142 } else { 143 if ret.Get(0) != nil { 144 r0 = ret.Get(0).(*flow.TransactionResult) 145 } 146 } 147 148 var r1 error 149 if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok { 150 r1 = rf(_a0, _a1) 151 } else { 152 r1 = ret.Error(1) 153 } 154 155 return r0, r1 156 } 157 158 // SendTransaction provides a mock function with given fields: _a0, _a1 159 func (_m *SDKClientWrapper) SendTransaction(_a0 context.Context, _a1 flow.Transaction) error { 160 ret := _m.Called(_a0, _a1) 161 162 var r0 error 163 if rf, ok := ret.Get(0).(func(context.Context, flow.Transaction) error); ok { 164 r0 = rf(_a0, _a1) 165 } else { 166 r0 = ret.Error(0) 167 } 168 169 return r0 170 } 171 172 type mockConstructorTestingTNewSDKClientWrapper interface { 173 mock.TestingT 174 Cleanup(func()) 175 } 176 177 // NewSDKClientWrapper creates a new instance of SDKClientWrapper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 178 func NewSDKClientWrapper(t mockConstructorTestingTNewSDKClientWrapper) *SDKClientWrapper { 179 mock := &SDKClientWrapper{} 180 mock.Mock.Test(t) 181 182 t.Cleanup(func() { mock.AssertExpectations(t) }) 183 184 return mock 185 }