Best Mock code snippet using gomock.Call
protocol_mock.go
Source:protocol_mock.go
...40func (_m *MockTProtocol) EXPECT() *_MockTProtocolRecorder {41 return _m.recorder42}43func (_m *MockTProtocol) Flush() error {44 ret := _m.ctrl.Call(_m, "Flush")45 ret0, _ := ret[0].(error)46 return ret047}48func (_mr *_MockTProtocolRecorder) Flush() *gomock.Call {49 return _mr.mock.ctrl.RecordCall(_mr.mock, "Flush")50}51func (_m *MockTProtocol) ReadBinary() ([]byte, error) {52 ret := _m.ctrl.Call(_m, "ReadBinary")53 ret0, _ := ret[0].([]byte)54 ret1, _ := ret[1].(error)55 return ret0, ret156}57func (_mr *_MockTProtocolRecorder) ReadBinary() *gomock.Call {58 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadBinary")59}60func (_m *MockTProtocol) ReadBool() (bool, error) {61 ret := _m.ctrl.Call(_m, "ReadBool")62 ret0, _ := ret[0].(bool)63 ret1, _ := ret[1].(error)64 return ret0, ret165}66func (_mr *_MockTProtocolRecorder) ReadBool() *gomock.Call {67 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadBool")68}69func (_m *MockTProtocol) ReadByte() (int8, error) {70 ret := _m.ctrl.Call(_m, "ReadByte")71 ret0, _ := ret[0].(int8)72 ret1, _ := ret[1].(error)73 return ret0, ret174}75func (_mr *_MockTProtocolRecorder) ReadByte() *gomock.Call {76 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadByte")77}78func (_m *MockTProtocol) ReadDouble() (float64, error) {79 ret := _m.ctrl.Call(_m, "ReadDouble")80 ret0, _ := ret[0].(float64)81 ret1, _ := ret[1].(error)82 return ret0, ret183}84func (_mr *_MockTProtocolRecorder) ReadDouble() *gomock.Call {85 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadDouble")86}87func (_m *MockTProtocol) ReadFieldBegin() (string, thrift.TType, int16, error) {88 ret := _m.ctrl.Call(_m, "ReadFieldBegin")89 ret0, _ := ret[0].(string)90 ret1, _ := ret[1].(thrift.TType)91 ret2, _ := ret[2].(int16)92 ret3, _ := ret[3].(error)93 return ret0, ret1, ret2, ret394}95func (_mr *_MockTProtocolRecorder) ReadFieldBegin() *gomock.Call {96 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadFieldBegin")97}98func (_m *MockTProtocol) ReadFieldEnd() error {99 ret := _m.ctrl.Call(_m, "ReadFieldEnd")100 ret0, _ := ret[0].(error)101 return ret0102}103func (_mr *_MockTProtocolRecorder) ReadFieldEnd() *gomock.Call {104 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadFieldEnd")105}106func (_m *MockTProtocol) ReadI16() (int16, error) {107 ret := _m.ctrl.Call(_m, "ReadI16")108 ret0, _ := ret[0].(int16)109 ret1, _ := ret[1].(error)110 return ret0, ret1111}112func (_mr *_MockTProtocolRecorder) ReadI16() *gomock.Call {113 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI16")114}115func (_m *MockTProtocol) ReadI32() (int32, error) {116 ret := _m.ctrl.Call(_m, "ReadI32")117 ret0, _ := ret[0].(int32)118 ret1, _ := ret[1].(error)119 return ret0, ret1120}121func (_mr *_MockTProtocolRecorder) ReadI32() *gomock.Call {122 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI32")123}124func (_m *MockTProtocol) ReadI64() (int64, error) {125 ret := _m.ctrl.Call(_m, "ReadI64")126 ret0, _ := ret[0].(int64)127 ret1, _ := ret[1].(error)128 return ret0, ret1129}130func (_mr *_MockTProtocolRecorder) ReadI64() *gomock.Call {131 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI64")132}133func (_m *MockTProtocol) ReadListBegin() (thrift.TType, int, error) {134 ret := _m.ctrl.Call(_m, "ReadListBegin")135 ret0, _ := ret[0].(thrift.TType)136 ret1, _ := ret[1].(int)137 ret2, _ := ret[2].(error)138 return ret0, ret1, ret2139}140func (_mr *_MockTProtocolRecorder) ReadListBegin() *gomock.Call {141 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadListBegin")142}143func (_m *MockTProtocol) ReadListEnd() error {144 ret := _m.ctrl.Call(_m, "ReadListEnd")145 ret0, _ := ret[0].(error)146 return ret0147}148func (_mr *_MockTProtocolRecorder) ReadListEnd() *gomock.Call {149 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadListEnd")150}151func (_m *MockTProtocol) ReadMapBegin() (thrift.TType, thrift.TType, int, error) {152 ret := _m.ctrl.Call(_m, "ReadMapBegin")153 ret0, _ := ret[0].(thrift.TType)154 ret1, _ := ret[1].(thrift.TType)155 ret2, _ := ret[2].(int)156 ret3, _ := ret[3].(error)157 return ret0, ret1, ret2, ret3158}159func (_mr *_MockTProtocolRecorder) ReadMapBegin() *gomock.Call {160 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMapBegin")161}162func (_m *MockTProtocol) ReadMapEnd() error {163 ret := _m.ctrl.Call(_m, "ReadMapEnd")164 ret0, _ := ret[0].(error)165 return ret0166}167func (_mr *_MockTProtocolRecorder) ReadMapEnd() *gomock.Call {168 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMapEnd")169}170func (_m *MockTProtocol) ReadMessageBegin() (string, thrift.TMessageType, int32, error) {171 ret := _m.ctrl.Call(_m, "ReadMessageBegin")172 ret0, _ := ret[0].(string)173 ret1, _ := ret[1].(thrift.TMessageType)174 ret2, _ := ret[2].(int32)175 ret3, _ := ret[3].(error)176 return ret0, ret1, ret2, ret3177}178func (_mr *_MockTProtocolRecorder) ReadMessageBegin() *gomock.Call {179 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMessageBegin")180}181func (_m *MockTProtocol) ReadMessageEnd() error {182 ret := _m.ctrl.Call(_m, "ReadMessageEnd")183 ret0, _ := ret[0].(error)184 return ret0185}186func (_mr *_MockTProtocolRecorder) ReadMessageEnd() *gomock.Call {187 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMessageEnd")188}189func (_m *MockTProtocol) ReadSetBegin() (thrift.TType, int, error) {190 ret := _m.ctrl.Call(_m, "ReadSetBegin")191 ret0, _ := ret[0].(thrift.TType)192 ret1, _ := ret[1].(int)193 ret2, _ := ret[2].(error)194 return ret0, ret1, ret2195}196func (_mr *_MockTProtocolRecorder) ReadSetBegin() *gomock.Call {197 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadSetBegin")198}199func (_m *MockTProtocol) ReadSetEnd() error {200 ret := _m.ctrl.Call(_m, "ReadSetEnd")201 ret0, _ := ret[0].(error)202 return ret0203}204func (_mr *_MockTProtocolRecorder) ReadSetEnd() *gomock.Call {205 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadSetEnd")206}207func (_m *MockTProtocol) ReadString() (string, error) {208 ret := _m.ctrl.Call(_m, "ReadString")209 ret0, _ := ret[0].(string)210 ret1, _ := ret[1].(error)211 return ret0, ret1212}213func (_mr *_MockTProtocolRecorder) ReadString() *gomock.Call {214 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadString")215}216func (_m *MockTProtocol) ReadStructBegin() (string, error) {217 ret := _m.ctrl.Call(_m, "ReadStructBegin")218 ret0, _ := ret[0].(string)219 ret1, _ := ret[1].(error)220 return ret0, ret1221}222func (_mr *_MockTProtocolRecorder) ReadStructBegin() *gomock.Call {223 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadStructBegin")224}225func (_m *MockTProtocol) ReadStructEnd() error {226 ret := _m.ctrl.Call(_m, "ReadStructEnd")227 ret0, _ := ret[0].(error)228 return ret0229}230func (_mr *_MockTProtocolRecorder) ReadStructEnd() *gomock.Call {231 return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadStructEnd")232}233func (_m *MockTProtocol) Skip(_param0 thrift.TType) error {234 ret := _m.ctrl.Call(_m, "Skip", _param0)235 ret0, _ := ret[0].(error)236 return ret0237}238func (_mr *_MockTProtocolRecorder) Skip(arg0 interface{}) *gomock.Call {239 return _mr.mock.ctrl.RecordCall(_mr.mock, "Skip", arg0)240}241func (_m *MockTProtocol) Transport() thrift.TTransport {242 ret := _m.ctrl.Call(_m, "Transport")243 ret0, _ := ret[0].(thrift.TTransport)244 return ret0245}246func (_mr *_MockTProtocolRecorder) Transport() *gomock.Call {247 return _mr.mock.ctrl.RecordCall(_mr.mock, "Transport")248}249func (_m *MockTProtocol) WriteBinary(_param0 []byte) error {250 ret := _m.ctrl.Call(_m, "WriteBinary", _param0)251 ret0, _ := ret[0].(error)252 return ret0253}254func (_mr *_MockTProtocolRecorder) WriteBinary(arg0 interface{}) *gomock.Call {255 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteBinary", arg0)256}257func (_m *MockTProtocol) WriteBool(_param0 bool) error {258 ret := _m.ctrl.Call(_m, "WriteBool", _param0)259 ret0, _ := ret[0].(error)260 return ret0261}262func (_mr *_MockTProtocolRecorder) WriteBool(arg0 interface{}) *gomock.Call {263 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteBool", arg0)264}265func (_m *MockTProtocol) WriteByte(_param0 int8) error {266 ret := _m.ctrl.Call(_m, "WriteByte", _param0)267 ret0, _ := ret[0].(error)268 return ret0269}270func (_mr *_MockTProtocolRecorder) WriteByte(arg0 interface{}) *gomock.Call {271 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteByte", arg0)272}273func (_m *MockTProtocol) WriteDouble(_param0 float64) error {274 ret := _m.ctrl.Call(_m, "WriteDouble", _param0)275 ret0, _ := ret[0].(error)276 return ret0277}278func (_mr *_MockTProtocolRecorder) WriteDouble(arg0 interface{}) *gomock.Call {279 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteDouble", arg0)280}281func (_m *MockTProtocol) WriteFieldBegin(_param0 string, _param1 thrift.TType, _param2 int16) error {282 ret := _m.ctrl.Call(_m, "WriteFieldBegin", _param0, _param1, _param2)283 ret0, _ := ret[0].(error)284 return ret0285}286func (_mr *_MockTProtocolRecorder) WriteFieldBegin(arg0, arg1, arg2 interface{}) *gomock.Call {287 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldBegin", arg0, arg1, arg2)288}289func (_m *MockTProtocol) WriteFieldEnd() error {290 ret := _m.ctrl.Call(_m, "WriteFieldEnd")291 ret0, _ := ret[0].(error)292 return ret0293}294func (_mr *_MockTProtocolRecorder) WriteFieldEnd() *gomock.Call {295 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldEnd")296}297func (_m *MockTProtocol) WriteFieldStop() error {298 ret := _m.ctrl.Call(_m, "WriteFieldStop")299 ret0, _ := ret[0].(error)300 return ret0301}302func (_mr *_MockTProtocolRecorder) WriteFieldStop() *gomock.Call {303 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldStop")304}305func (_m *MockTProtocol) WriteI16(_param0 int16) error {306 ret := _m.ctrl.Call(_m, "WriteI16", _param0)307 ret0, _ := ret[0].(error)308 return ret0309}310func (_mr *_MockTProtocolRecorder) WriteI16(arg0 interface{}) *gomock.Call {311 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI16", arg0)312}313func (_m *MockTProtocol) WriteI32(_param0 int32) error {314 ret := _m.ctrl.Call(_m, "WriteI32", _param0)315 ret0, _ := ret[0].(error)316 return ret0317}318func (_mr *_MockTProtocolRecorder) WriteI32(arg0 interface{}) *gomock.Call {319 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI32", arg0)320}321func (_m *MockTProtocol) WriteI64(_param0 int64) error {322 ret := _m.ctrl.Call(_m, "WriteI64", _param0)323 ret0, _ := ret[0].(error)324 return ret0325}326func (_mr *_MockTProtocolRecorder) WriteI64(arg0 interface{}) *gomock.Call {327 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI64", arg0)328}329func (_m *MockTProtocol) WriteListBegin(_param0 thrift.TType, _param1 int) error {330 ret := _m.ctrl.Call(_m, "WriteListBegin", _param0, _param1)331 ret0, _ := ret[0].(error)332 return ret0333}334func (_mr *_MockTProtocolRecorder) WriteListBegin(arg0, arg1 interface{}) *gomock.Call {335 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteListBegin", arg0, arg1)336}337func (_m *MockTProtocol) WriteListEnd() error {338 ret := _m.ctrl.Call(_m, "WriteListEnd")339 ret0, _ := ret[0].(error)340 return ret0341}342func (_mr *_MockTProtocolRecorder) WriteListEnd() *gomock.Call {343 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteListEnd")344}345func (_m *MockTProtocol) WriteMapBegin(_param0 thrift.TType, _param1 thrift.TType, _param2 int) error {346 ret := _m.ctrl.Call(_m, "WriteMapBegin", _param0, _param1, _param2)347 ret0, _ := ret[0].(error)348 return ret0349}350func (_mr *_MockTProtocolRecorder) WriteMapBegin(arg0, arg1, arg2 interface{}) *gomock.Call {351 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMapBegin", arg0, arg1, arg2)352}353func (_m *MockTProtocol) WriteMapEnd() error {354 ret := _m.ctrl.Call(_m, "WriteMapEnd")355 ret0, _ := ret[0].(error)356 return ret0357}358func (_mr *_MockTProtocolRecorder) WriteMapEnd() *gomock.Call {359 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMapEnd")360}361func (_m *MockTProtocol) WriteMessageBegin(_param0 string, _param1 thrift.TMessageType, _param2 int32) error {362 ret := _m.ctrl.Call(_m, "WriteMessageBegin", _param0, _param1, _param2)363 ret0, _ := ret[0].(error)364 return ret0365}366func (_mr *_MockTProtocolRecorder) WriteMessageBegin(arg0, arg1, arg2 interface{}) *gomock.Call {367 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMessageBegin", arg0, arg1, arg2)368}369func (_m *MockTProtocol) WriteMessageEnd() error {370 ret := _m.ctrl.Call(_m, "WriteMessageEnd")371 ret0, _ := ret[0].(error)372 return ret0373}374func (_mr *_MockTProtocolRecorder) WriteMessageEnd() *gomock.Call {375 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMessageEnd")376}377func (_m *MockTProtocol) WriteSetBegin(_param0 thrift.TType, _param1 int) error {378 ret := _m.ctrl.Call(_m, "WriteSetBegin", _param0, _param1)379 ret0, _ := ret[0].(error)380 return ret0381}382func (_mr *_MockTProtocolRecorder) WriteSetBegin(arg0, arg1 interface{}) *gomock.Call {383 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteSetBegin", arg0, arg1)384}385func (_m *MockTProtocol) WriteSetEnd() error {386 ret := _m.ctrl.Call(_m, "WriteSetEnd")387 ret0, _ := ret[0].(error)388 return ret0389}390func (_mr *_MockTProtocolRecorder) WriteSetEnd() *gomock.Call {391 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteSetEnd")392}393func (_m *MockTProtocol) WriteString(_param0 string) error {394 ret := _m.ctrl.Call(_m, "WriteString", _param0)395 ret0, _ := ret[0].(error)396 return ret0397}398func (_mr *_MockTProtocolRecorder) WriteString(arg0 interface{}) *gomock.Call {399 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteString", arg0)400}401func (_m *MockTProtocol) WriteStructBegin(_param0 string) error {402 ret := _m.ctrl.Call(_m, "WriteStructBegin", _param0)403 ret0, _ := ret[0].(error)404 return ret0405}406func (_mr *_MockTProtocolRecorder) WriteStructBegin(arg0 interface{}) *gomock.Call {407 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteStructBegin", arg0)408}409func (_m *MockTProtocol) WriteStructEnd() error {410 ret := _m.ctrl.Call(_m, "WriteStructEnd")411 ret0, _ := ret[0].(error)412 return ret0413}414func (_mr *_MockTProtocolRecorder) WriteStructEnd() *gomock.Call {415 return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteStructEnd")416}...
mock_handler.go
Source:mock_handler.go
...40func (_m *MockThriftTest) EXPECT() *_MockThriftTestRecorder {41 return _m.recorder42}43func (_m *MockThriftTest) TestBool(_param0 bool) (bool, error) {44 ret := _m.ctrl.Call(_m, "TestBool", _param0)45 ret0, _ := ret[0].(bool)46 ret1, _ := ret[1].(error)47 return ret0, ret148}49func (_mr *_MockThriftTestRecorder) TestBool(arg0 interface{}) *gomock.Call {50 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestBool", arg0)51}52func (_m *MockThriftTest) TestByte(_param0 int8) (int8, error) {53 ret := _m.ctrl.Call(_m, "TestByte", _param0)54 ret0, _ := ret[0].(int8)55 ret1, _ := ret[1].(error)56 return ret0, ret157}58func (_mr *_MockThriftTestRecorder) TestByte(arg0 interface{}) *gomock.Call {59 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestByte", arg0)60}61func (_m *MockThriftTest) TestDouble(_param0 float64) (float64, error) {62 ret := _m.ctrl.Call(_m, "TestDouble", _param0)63 ret0, _ := ret[0].(float64)64 ret1, _ := ret[1].(error)65 return ret0, ret166}67func (_mr *_MockThriftTestRecorder) TestDouble(arg0 interface{}) *gomock.Call {68 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestDouble", arg0)69}70func (_m *MockThriftTest) TestBinary(_param0 []byte) ([]byte, error) {71 ret := _m.ctrl.Call(_m, "TestBinary", _param0)72 ret0, _ := ret[0].([]byte)73 ret1, _ := ret[1].(error)74 return ret0, ret175}76func (_mr *_MockThriftTestRecorder) TestBinary(arg0 interface{}) *gomock.Call {77 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestBinary", arg0)78}79func (_m *MockThriftTest) TestEnum(_param0 thrifttest.Numberz) (thrifttest.Numberz, error) {80 ret := _m.ctrl.Call(_m, "TestEnum", _param0)81 ret0, _ := ret[0].(thrifttest.Numberz)82 ret1, _ := ret[1].(error)83 return ret0, ret184}85func (_mr *_MockThriftTestRecorder) TestEnum(arg0 interface{}) *gomock.Call {86 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestEnum", arg0)87}88func (_m *MockThriftTest) TestException(_param0 string) error {89 ret := _m.ctrl.Call(_m, "TestException", _param0)90 ret0, _ := ret[0].(error)91 return ret092}93func (_mr *_MockThriftTestRecorder) TestException(arg0 interface{}) *gomock.Call {94 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestException", arg0)95}96func (_m *MockThriftTest) TestI32(_param0 int32) (int32, error) {97 ret := _m.ctrl.Call(_m, "TestI32", _param0)98 ret0, _ := ret[0].(int32)99 ret1, _ := ret[1].(error)100 return ret0, ret1101}102func (_mr *_MockThriftTestRecorder) TestI32(arg0 interface{}) *gomock.Call {103 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestI32", arg0)104}105func (_m *MockThriftTest) TestI64(_param0 int64) (int64, error) {106 ret := _m.ctrl.Call(_m, "TestI64", _param0)107 ret0, _ := ret[0].(int64)108 ret1, _ := ret[1].(error)109 return ret0, ret1110}111func (_mr *_MockThriftTestRecorder) TestI64(arg0 interface{}) *gomock.Call {112 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestI64", arg0)113}114func (_m *MockThriftTest) TestInsanity(_param0 *thrifttest.Insanity) (map[thrifttest.UserId]map[thrifttest.Numberz]*thrifttest.Insanity, error) {115 ret := _m.ctrl.Call(_m, "TestInsanity", _param0)116 ret0, _ := ret[0].(map[thrifttest.UserId]map[thrifttest.Numberz]*thrifttest.Insanity)117 ret1, _ := ret[1].(error)118 return ret0, ret1119}120func (_mr *_MockThriftTestRecorder) TestInsanity(arg0 interface{}) *gomock.Call {121 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestInsanity", arg0)122}123func (_m *MockThriftTest) TestList(_param0 []int32) ([]int32, error) {124 ret := _m.ctrl.Call(_m, "TestList", _param0)125 ret0, _ := ret[0].([]int32)126 ret1, _ := ret[1].(error)127 return ret0, ret1128}129func (_mr *_MockThriftTestRecorder) TestList(arg0 interface{}) *gomock.Call {130 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestList", arg0)131}132func (_m *MockThriftTest) TestMap(_param0 map[int32]int32) (map[int32]int32, error) {133 ret := _m.ctrl.Call(_m, "TestMap", _param0)134 ret0, _ := ret[0].(map[int32]int32)135 ret1, _ := ret[1].(error)136 return ret0, ret1137}138func (_mr *_MockThriftTestRecorder) TestMap(arg0 interface{}) *gomock.Call {139 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestMap", arg0)140}141func (_m *MockThriftTest) TestMapMap(_param0 int32) (map[int32]map[int32]int32, error) {142 ret := _m.ctrl.Call(_m, "TestMapMap", _param0)143 ret0, _ := ret[0].(map[int32]map[int32]int32)144 ret1, _ := ret[1].(error)145 return ret0, ret1146}147func (_mr *_MockThriftTestRecorder) TestMapMap(arg0 interface{}) *gomock.Call {148 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestMapMap", arg0)149}150func (_m *MockThriftTest) TestMulti(_param0 int8, _param1 int32, _param2 int64, _param3 map[int16]string, _param4 thrifttest.Numberz, _param5 thrifttest.UserId) (*thrifttest.Xtruct, error) {151 ret := _m.ctrl.Call(_m, "TestMulti", _param0, _param1, _param2, _param3, _param4, _param5)152 ret0, _ := ret[0].(*thrifttest.Xtruct)153 ret1, _ := ret[1].(error)154 return ret0, ret1155}156func (_mr *_MockThriftTestRecorder) TestMulti(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {157 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestMulti", arg0, arg1, arg2, arg3, arg4, arg5)158}159func (_m *MockThriftTest) TestMultiException(_param0 string, _param1 string) (*thrifttest.Xtruct, error) {160 ret := _m.ctrl.Call(_m, "TestMultiException", _param0, _param1)161 ret0, _ := ret[0].(*thrifttest.Xtruct)162 ret1, _ := ret[1].(error)163 return ret0, ret1164}165func (_mr *_MockThriftTestRecorder) TestMultiException(arg0, arg1 interface{}) *gomock.Call {166 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestMultiException", arg0, arg1)167}168func (_m *MockThriftTest) TestNest(_param0 *thrifttest.Xtruct2) (*thrifttest.Xtruct2, error) {169 ret := _m.ctrl.Call(_m, "TestNest", _param0)170 ret0, _ := ret[0].(*thrifttest.Xtruct2)171 ret1, _ := ret[1].(error)172 return ret0, ret1173}174func (_mr *_MockThriftTestRecorder) TestNest(arg0 interface{}) *gomock.Call {175 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestNest", arg0)176}177func (_m *MockThriftTest) TestOneway(_param0 int32) error {178 ret := _m.ctrl.Call(_m, "TestOneway", _param0)179 ret0, _ := ret[0].(error)180 return ret0181}182func (_mr *_MockThriftTestRecorder) TestOneway(arg0 interface{}) *gomock.Call {183 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestOneway", arg0)184}185func (_m *MockThriftTest) TestSet(_param0 map[int32]struct{}) (map[int32]struct{}, error) {186 ret := _m.ctrl.Call(_m, "TestSet", _param0)187 ret0, _ := ret[0].(map[int32]struct{})188 ret1, _ := ret[1].(error)189 return ret0, ret1190}191func (_mr *_MockThriftTestRecorder) TestSet(arg0 interface{}) *gomock.Call {192 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestSet", arg0)193}194func (_m *MockThriftTest) TestString(_param0 string) (string, error) {195 ret := _m.ctrl.Call(_m, "TestString", _param0)196 ret0, _ := ret[0].(string)197 ret1, _ := ret[1].(error)198 return ret0, ret1199}200func (_mr *_MockThriftTestRecorder) TestString(arg0 interface{}) *gomock.Call {201 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestString", arg0)202}203func (_m *MockThriftTest) TestStringMap(_param0 map[string]string) (map[string]string, error) {204 ret := _m.ctrl.Call(_m, "TestStringMap", _param0)205 ret0, _ := ret[0].(map[string]string)206 ret1, _ := ret[1].(error)207 return ret0, ret1208}209func (_mr *_MockThriftTestRecorder) TestStringMap(arg0 interface{}) *gomock.Call {210 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestStringMap", arg0)211}212func (_m *MockThriftTest) TestStruct(_param0 *thrifttest.Xtruct) (*thrifttest.Xtruct, error) {213 ret := _m.ctrl.Call(_m, "TestStruct", _param0)214 ret0, _ := ret[0].(*thrifttest.Xtruct)215 ret1, _ := ret[1].(error)216 return ret0, ret1217}218func (_mr *_MockThriftTestRecorder) TestStruct(arg0 interface{}) *gomock.Call {219 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestStruct", arg0)220}221func (_m *MockThriftTest) TestTypedef(_param0 thrifttest.UserId) (thrifttest.UserId, error) {222 ret := _m.ctrl.Call(_m, "TestTypedef", _param0)223 ret0, _ := ret[0].(thrifttest.UserId)224 ret1, _ := ret[1].(error)225 return ret0, ret1226}227func (_mr *_MockThriftTestRecorder) TestTypedef(arg0 interface{}) *gomock.Call {228 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestTypedef", arg0)229}230func (_m *MockThriftTest) TestVoid() error {231 ret := _m.ctrl.Call(_m, "TestVoid")232 ret0, _ := ret[0].(error)233 return ret0234}235func (_mr *_MockThriftTestRecorder) TestVoid() *gomock.Call {236 return _mr.mock.ctrl.RecordCall(_mr.mock, "TestVoid")237}...
Call
Using AI Code Generation
1import (2func TestCall(t *testing.T) {3 ctrl := gomock.NewController(t)4 defer ctrl.Finish()5 mock := NewMockInterface(ctrl)6 mock.EXPECT().Call("foo").Return("bar")7 assert.Equal(t, "bar", mock.Call("foo"))8}9import (10func TestCall(t *testing.T) {11 ctrl := gomock.NewController(t)12 defer ctrl.Finish()13 mock := NewMockInterface(ctrl)14 mock.EXPECT().Call("foo").Return("bar")15 assert.Equal(t, "bar", mock.Call("foo"))16}17import (18func TestCall(t *testing.T) {19 ctrl := gomock.NewController(t)20 defer ctrl.Finish()21 mock := NewMockInterface(ctrl)22 mock.EXPECT().Call("foo").Return("bar")23 assert.Equal(t, "bar", mock.Call("foo"))24}25import (26func TestCall(t *testing.T) {27 ctrl := gomock.NewController(t)28 defer ctrl.Finish()29 mock := NewMockInterface(ctrl)30 mock.EXPECT().Call("foo").Return("bar")31 assert.Equal(t, "bar", mock.Call("foo"))32}33import (34func TestCall(t *testing.T) {35 ctrl := gomock.NewController(t)36 defer ctrl.Finish()37 mock := NewMockInterface(ctrl)
Call
Using AI Code Generation
1import (2func TestCall(t *testing.T) {3 ctrl := gomock.NewController(t)4 defer ctrl.Finish()5 m := NewMockFoo(ctrl)6 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {7 })8 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {9 })10 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {11 })12 fmt.Println(m.Bar(1))13 fmt.Println(m.Bar(1))14 fmt.Println(m.Bar(1))15}16import (17func TestCall(t *testing.T) {18 ctrl := gomock.NewController(t)19 defer ctrl.Finish()20 m := NewMockFoo(ctrl)21 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {22 })23 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {24 })25 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {26 })27 fmt.Println(m.Bar(1))28 fmt.Println(m.Bar(1))29 fmt.Println(m.Bar(1))30}31import (32func TestCall(t *testing.T) {33 ctrl := gomock.NewController(t)34 defer ctrl.Finish()35 m := NewMockFoo(ctrl)36 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {37 })38 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {39 })40 m.EXPECT().Bar(gomock.Any()).DoAndReturn(func(i int) int {
Call
Using AI Code Generation
1func CallMethod() {2 mockCtrl := gomock.NewController(t)3 defer mockCtrl.Finish()4 mock := NewMockInterface(mockCtrl)5 mock.EXPECT().Method().Return(1)6 fmt.Println(mock.Method())7}8func CallMethod() {9 mockCtrl := gomock.NewController(t)10 defer mockCtrl.Finish()11 mock := NewMockInterface(mockCtrl)12 mock.EXPECT().Method().Return(1)13 fmt.Println(mock.Method())14}15func CallMethod() {16 mockCtrl := gomock.NewController(t)17 defer mockCtrl.Finish()18 mock := NewMockInterface(mockCtrl)19 mock.EXPECT().Method().Return(1)20 fmt.Println(mock.Method())21}22func CallMethod() {23 mockCtrl := gomock.NewController(t)24 defer mockCtrl.Finish()25 mock := NewMockInterface(mockCtrl)26 mock.EXPECT().Method().Return(1)27 fmt.Println(mock.Method())28}29func CallMethod() {30 mockCtrl := gomock.NewController(t)31 defer mockCtrl.Finish()32 mock := NewMockInterface(mockCtrl)33 mock.EXPECT().Method().Return(1)34 fmt.Println(mock.Method())35}36func CallMethod() {37 mockCtrl := gomock.NewController(t)38 defer mockCtrl.Finish()39 mock := NewMockInterface(mockCtrl)40 mock.EXPECT().Method().Return(1)41 fmt.Println(mock.Method())42}43func CallMethod() {44 mockCtrl := gomock.NewController(t)45 defer mockCtrl.Finish()46 mock := NewMockInterface(mockCtrl)47 mock.EXPECT().Method().Return(1)48 fmt.Println(mock.Method())49}50func CallMethod() {51 mockCtrl := gomock.NewController(t
Call
Using AI Code Generation
1import (2func TestCall(t *testing.T) {3 ctrl := gomock.NewController(t)4 defer ctrl.Finish()5 m := mock.NewMockMyInterface(ctrl)6 m.EXPECT().Call("abc").Return(100)7 fmt.Println(m.Call("abc"))8}9import (10func TestDo(t *testing.T) {11 ctrl := gomock.NewController(t)12 defer ctrl.Finish()13 m := mock.NewMockMyInterface(ctrl)14 m.EXPECT().Do("abc").Do(func(s string) {15 fmt.Println(s)16 })17 m.Do("abc")18}19import (20func TestDoAndReturn(t *testing.T) {21 ctrl := gomock.NewController(t)22 defer ctrl.Finish()23 m := mock.NewMockMyInterface(ctrl)24 m.EXPECT().DoAndReturn("abc").DoAndReturn(func(s string) int {25 fmt.Println(s)26 })27 fmt.Println(m.DoAndReturn("abc"))28}29import (30func TestDoAndReturn(t *testing.T) {31 ctrl := gomock.NewController(t)32 defer ctrl.Finish()33 m := mock.NewMockMyInterface(ctrl)34 m.EXPECT().DoAndReturn("abc").DoAndReturn(func(s string) int {35 fmt.Println(s)
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!