github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/sdk_client_wrapper.go (about) 1 // Code generated by mockery v2.21.4. 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 var r1 error 26 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, []cadence.Value) (cadence.Value, error)); ok { 27 return rf(_a0, _a1, _a2, _a3) 28 } 29 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, []cadence.Value) cadence.Value); ok { 30 r0 = rf(_a0, _a1, _a2, _a3) 31 } else { 32 if ret.Get(0) != nil { 33 r0 = ret.Get(0).(cadence.Value) 34 } 35 } 36 37 if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, []byte, []cadence.Value) error); ok { 38 r1 = rf(_a0, _a1, _a2, _a3) 39 } else { 40 r1 = ret.Error(1) 41 } 42 43 return r0, r1 44 } 45 46 // ExecuteScriptAtLatestBlock provides a mock function with given fields: _a0, _a1, _a2 47 func (_m *SDKClientWrapper) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 []byte, _a2 []cadence.Value) (cadence.Value, error) { 48 ret := _m.Called(_a0, _a1, _a2) 49 50 var r0 cadence.Value 51 var r1 error 52 if rf, ok := ret.Get(0).(func(context.Context, []byte, []cadence.Value) (cadence.Value, error)); ok { 53 return rf(_a0, _a1, _a2) 54 } 55 if rf, ok := ret.Get(0).(func(context.Context, []byte, []cadence.Value) cadence.Value); ok { 56 r0 = rf(_a0, _a1, _a2) 57 } else { 58 if ret.Get(0) != nil { 59 r0 = ret.Get(0).(cadence.Value) 60 } 61 } 62 63 if rf, ok := ret.Get(1).(func(context.Context, []byte, []cadence.Value) error); ok { 64 r1 = rf(_a0, _a1, _a2) 65 } else { 66 r1 = ret.Error(1) 67 } 68 69 return r0, r1 70 } 71 72 // GetAccount provides a mock function with given fields: _a0, _a1 73 func (_m *SDKClientWrapper) GetAccount(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { 74 ret := _m.Called(_a0, _a1) 75 76 var r0 *flow.Account 77 var r1 error 78 if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { 79 return rf(_a0, _a1) 80 } 81 if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok { 82 r0 = rf(_a0, _a1) 83 } else { 84 if ret.Get(0) != nil { 85 r0 = ret.Get(0).(*flow.Account) 86 } 87 } 88 89 if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok { 90 r1 = rf(_a0, _a1) 91 } else { 92 r1 = ret.Error(1) 93 } 94 95 return r0, r1 96 } 97 98 // GetAccountAtLatestBlock provides a mock function with given fields: _a0, _a1 99 func (_m *SDKClientWrapper) GetAccountAtLatestBlock(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { 100 ret := _m.Called(_a0, _a1) 101 102 var r0 *flow.Account 103 var r1 error 104 if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { 105 return rf(_a0, _a1) 106 } 107 if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok { 108 r0 = rf(_a0, _a1) 109 } else { 110 if ret.Get(0) != nil { 111 r0 = ret.Get(0).(*flow.Account) 112 } 113 } 114 115 if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok { 116 r1 = rf(_a0, _a1) 117 } else { 118 r1 = ret.Error(1) 119 } 120 121 return r0, r1 122 } 123 124 // GetLatestBlock provides a mock function with given fields: _a0, _a1 125 func (_m *SDKClientWrapper) GetLatestBlock(_a0 context.Context, _a1 bool) (*flow.Block, error) { 126 ret := _m.Called(_a0, _a1) 127 128 var r0 *flow.Block 129 var r1 error 130 if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Block, error)); ok { 131 return rf(_a0, _a1) 132 } 133 if rf, ok := ret.Get(0).(func(context.Context, bool) *flow.Block); ok { 134 r0 = rf(_a0, _a1) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).(*flow.Block) 138 } 139 } 140 141 if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { 142 r1 = rf(_a0, _a1) 143 } else { 144 r1 = ret.Error(1) 145 } 146 147 return r0, r1 148 } 149 150 // GetTransactionResult provides a mock function with given fields: _a0, _a1 151 func (_m *SDKClientWrapper) GetTransactionResult(_a0 context.Context, _a1 flow.Identifier) (*flow.TransactionResult, error) { 152 ret := _m.Called(_a0, _a1) 153 154 var r0 *flow.TransactionResult 155 var r1 error 156 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionResult, error)); ok { 157 return rf(_a0, _a1) 158 } 159 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.TransactionResult); ok { 160 r0 = rf(_a0, _a1) 161 } else { 162 if ret.Get(0) != nil { 163 r0 = ret.Get(0).(*flow.TransactionResult) 164 } 165 } 166 167 if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok { 168 r1 = rf(_a0, _a1) 169 } else { 170 r1 = ret.Error(1) 171 } 172 173 return r0, r1 174 } 175 176 // SendTransaction provides a mock function with given fields: _a0, _a1 177 func (_m *SDKClientWrapper) SendTransaction(_a0 context.Context, _a1 flow.Transaction) error { 178 ret := _m.Called(_a0, _a1) 179 180 var r0 error 181 if rf, ok := ret.Get(0).(func(context.Context, flow.Transaction) error); ok { 182 r0 = rf(_a0, _a1) 183 } else { 184 r0 = ret.Error(0) 185 } 186 187 return r0 188 } 189 190 type mockConstructorTestingTNewSDKClientWrapper interface { 191 mock.TestingT 192 Cleanup(func()) 193 } 194 195 // 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. 196 func NewSDKClientWrapper(t mockConstructorTestingTNewSDKClientWrapper) *SDKClientWrapper { 197 mock := &SDKClientWrapper{} 198 mock.Mock.Test(t) 199 200 t.Cleanup(func() { mock.AssertExpectations(t) }) 201 202 return mock 203 }