How to use RecordCall method of gomock Package

Best Mock code snippet using gomock.RecordCall

Run Mock automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

protocol_mock.go

Source: protocol_mock.go Github

copy
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20// Automatically generated by MockGen. DO NOT EDIT!
21// Source: thrift (interfaces: TProtocol)
22
23package tests
24
25import (
26	gomock "github.com/golang/mock/gomock"
27	thrift "thrift"
28)
29
30// Mock of TProtocol interface
31type MockTProtocol struct {
32	ctrl     *gomock.Controller
33	recorder *_MockTProtocolRecorder
34}
35
36// Recorder for MockTProtocol (not exported)
37type _MockTProtocolRecorder struct {
38	mock *MockTProtocol
39}
40
41func NewMockTProtocol(ctrl *gomock.Controller) *MockTProtocol {
42	mock := &MockTProtocol{ctrl: ctrl}
43	mock.recorder = &_MockTProtocolRecorder{mock}
44	return mock
45}
46
47func (_m *MockTProtocol) EXPECT() *_MockTProtocolRecorder {
48	return _m.recorder
49}
50
51func (_m *MockTProtocol) Flush() error {
52	ret := _m.ctrl.Call(_m, "Flush")
53	ret0, _ := ret[0].(error)
54	return ret0
55}
56
57func (_mr *_MockTProtocolRecorder) Flush() *gomock.Call {
58	return _mr.mock.ctrl.RecordCall(_mr.mock, "Flush")
59}
60
61func (_m *MockTProtocol) ReadBinary() ([]byte, error) {
62	ret := _m.ctrl.Call(_m, "ReadBinary")
63	ret0, _ := ret[0].([]byte)
64	ret1, _ := ret[1].(error)
65	return ret0, ret1
66}
67
68func (_mr *_MockTProtocolRecorder) ReadBinary() *gomock.Call {
69	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadBinary")
70}
71
72func (_m *MockTProtocol) ReadBool() (bool, error) {
73	ret := _m.ctrl.Call(_m, "ReadBool")
74	ret0, _ := ret[0].(bool)
75	ret1, _ := ret[1].(error)
76	return ret0, ret1
77}
78
79func (_mr *_MockTProtocolRecorder) ReadBool() *gomock.Call {
80	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadBool")
81}
82
83func (_m *MockTProtocol) ReadByte() (byte, error) {
84	ret := _m.ctrl.Call(_m, "ReadByte")
85	ret0, _ := ret[0].(byte)
86	ret1, _ := ret[1].(error)
87	return ret0, ret1
88}
89
90func (_mr *_MockTProtocolRecorder) ReadByte() *gomock.Call {
91	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadByte")
92}
93
94func (_m *MockTProtocol) ReadDouble() (float64, error) {
95	ret := _m.ctrl.Call(_m, "ReadDouble")
96	ret0, _ := ret[0].(float64)
97	ret1, _ := ret[1].(error)
98	return ret0, ret1
99}
100
101func (_mr *_MockTProtocolRecorder) ReadDouble() *gomock.Call {
102	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadDouble")
103}
104
105func (_m *MockTProtocol) ReadFieldBegin() (string, thrift.TType, int16, error) {
106	ret := _m.ctrl.Call(_m, "ReadFieldBegin")
107	ret0, _ := ret[0].(string)
108	ret1, _ := ret[1].(thrift.TType)
109	ret2, _ := ret[2].(int16)
110	ret3, _ := ret[3].(error)
111	return ret0, ret1, ret2, ret3
112}
113
114func (_mr *_MockTProtocolRecorder) ReadFieldBegin() *gomock.Call {
115	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadFieldBegin")
116}
117
118func (_m *MockTProtocol) ReadFieldEnd() error {
119	ret := _m.ctrl.Call(_m, "ReadFieldEnd")
120	ret0, _ := ret[0].(error)
121	return ret0
122}
123
124func (_mr *_MockTProtocolRecorder) ReadFieldEnd() *gomock.Call {
125	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadFieldEnd")
126}
127
128func (_m *MockTProtocol) ReadI16() (int16, error) {
129	ret := _m.ctrl.Call(_m, "ReadI16")
130	ret0, _ := ret[0].(int16)
131	ret1, _ := ret[1].(error)
132	return ret0, ret1
133}
134
135func (_mr *_MockTProtocolRecorder) ReadI16() *gomock.Call {
136	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI16")
137}
138
139func (_m *MockTProtocol) ReadI32() (int32, error) {
140	ret := _m.ctrl.Call(_m, "ReadI32")
141	ret0, _ := ret[0].(int32)
142	ret1, _ := ret[1].(error)
143	return ret0, ret1
144}
145
146func (_mr *_MockTProtocolRecorder) ReadI32() *gomock.Call {
147	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI32")
148}
149
150func (_m *MockTProtocol) ReadI64() (int64, error) {
151	ret := _m.ctrl.Call(_m, "ReadI64")
152	ret0, _ := ret[0].(int64)
153	ret1, _ := ret[1].(error)
154	return ret0, ret1
155}
156
157func (_mr *_MockTProtocolRecorder) ReadI64() *gomock.Call {
158	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI64")
159}
160
161func (_m *MockTProtocol) ReadListBegin() (thrift.TType, int, error) {
162	ret := _m.ctrl.Call(_m, "ReadListBegin")
163	ret0, _ := ret[0].(thrift.TType)
164	ret1, _ := ret[1].(int)
165	ret2, _ := ret[2].(error)
166	return ret0, ret1, ret2
167}
168
169func (_mr *_MockTProtocolRecorder) ReadListBegin() *gomock.Call {
170	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadListBegin")
171}
172
173func (_m *MockTProtocol) ReadListEnd() error {
174	ret := _m.ctrl.Call(_m, "ReadListEnd")
175	ret0, _ := ret[0].(error)
176	return ret0
177}
178
179func (_mr *_MockTProtocolRecorder) ReadListEnd() *gomock.Call {
180	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadListEnd")
181}
182
183func (_m *MockTProtocol) ReadMapBegin() (thrift.TType, thrift.TType, int, error) {
184	ret := _m.ctrl.Call(_m, "ReadMapBegin")
185	ret0, _ := ret[0].(thrift.TType)
186	ret1, _ := ret[1].(thrift.TType)
187	ret2, _ := ret[2].(int)
188	ret3, _ := ret[3].(error)
189	return ret0, ret1, ret2, ret3
190}
191
192func (_mr *_MockTProtocolRecorder) ReadMapBegin() *gomock.Call {
193	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMapBegin")
194}
195
196func (_m *MockTProtocol) ReadMapEnd() error {
197	ret := _m.ctrl.Call(_m, "ReadMapEnd")
198	ret0, _ := ret[0].(error)
199	return ret0
200}
201
202func (_mr *_MockTProtocolRecorder) ReadMapEnd() *gomock.Call {
203	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMapEnd")
204}
205
206func (_m *MockTProtocol) ReadMessageBegin() (string, thrift.TMessageType, int32, error) {
207	ret := _m.ctrl.Call(_m, "ReadMessageBegin")
208	ret0, _ := ret[0].(string)
209	ret1, _ := ret[1].(thrift.TMessageType)
210	ret2, _ := ret[2].(int32)
211	ret3, _ := ret[3].(error)
212	return ret0, ret1, ret2, ret3
213}
214
215func (_mr *_MockTProtocolRecorder) ReadMessageBegin() *gomock.Call {
216	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMessageBegin")
217}
218
219func (_m *MockTProtocol) ReadMessageEnd() error {
220	ret := _m.ctrl.Call(_m, "ReadMessageEnd")
221	ret0, _ := ret[0].(error)
222	return ret0
223}
224
225func (_mr *_MockTProtocolRecorder) ReadMessageEnd() *gomock.Call {
226	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMessageEnd")
227}
228
229func (_m *MockTProtocol) ReadSetBegin() (thrift.TType, int, error) {
230	ret := _m.ctrl.Call(_m, "ReadSetBegin")
231	ret0, _ := ret[0].(thrift.TType)
232	ret1, _ := ret[1].(int)
233	ret2, _ := ret[2].(error)
234	return ret0, ret1, ret2
235}
236
237func (_mr *_MockTProtocolRecorder) ReadSetBegin() *gomock.Call {
238	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadSetBegin")
239}
240
241func (_m *MockTProtocol) ReadSetEnd() error {
242	ret := _m.ctrl.Call(_m, "ReadSetEnd")
243	ret0, _ := ret[0].(error)
244	return ret0
245}
246
247func (_mr *_MockTProtocolRecorder) ReadSetEnd() *gomock.Call {
248	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadSetEnd")
249}
250
251func (_m *MockTProtocol) ReadString() (string, error) {
252	ret := _m.ctrl.Call(_m, "ReadString")
253	ret0, _ := ret[0].(string)
254	ret1, _ := ret[1].(error)
255	return ret0, ret1
256}
257
258func (_mr *_MockTProtocolRecorder) ReadString() *gomock.Call {
259	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadString")
260}
261
262func (_m *MockTProtocol) ReadStructBegin() (string, error) {
263	ret := _m.ctrl.Call(_m, "ReadStructBegin")
264	ret0, _ := ret[0].(string)
265	ret1, _ := ret[1].(error)
266	return ret0, ret1
267}
268
269func (_mr *_MockTProtocolRecorder) ReadStructBegin() *gomock.Call {
270	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadStructBegin")
271}
272
273func (_m *MockTProtocol) ReadStructEnd() error {
274	ret := _m.ctrl.Call(_m, "ReadStructEnd")
275	ret0, _ := ret[0].(error)
276	return ret0
277}
278
279func (_mr *_MockTProtocolRecorder) ReadStructEnd() *gomock.Call {
280	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadStructEnd")
281}
282
283func (_m *MockTProtocol) Skip(_param0 thrift.TType) error {
284	ret := _m.ctrl.Call(_m, "Skip", _param0)
285	ret0, _ := ret[0].(error)
286	return ret0
287}
288
289func (_mr *_MockTProtocolRecorder) Skip(arg0 interface{}) *gomock.Call {
290	return _mr.mock.ctrl.RecordCall(_mr.mock, "Skip", arg0)
291}
292
293func (_m *MockTProtocol) Transport() thrift.TTransport {
294	ret := _m.ctrl.Call(_m, "Transport")
295	ret0, _ := ret[0].(thrift.TTransport)
296	return ret0
297}
298
299func (_mr *_MockTProtocolRecorder) Transport() *gomock.Call {
300	return _mr.mock.ctrl.RecordCall(_mr.mock, "Transport")
301}
302
303func (_m *MockTProtocol) WriteBinary(_param0 []byte) error {
304	ret := _m.ctrl.Call(_m, "WriteBinary", _param0)
305	ret0, _ := ret[0].(error)
306	return ret0
307}
308
309func (_mr *_MockTProtocolRecorder) WriteBinary(arg0 interface{}) *gomock.Call {
310	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteBinary", arg0)
311}
312
313func (_m *MockTProtocol) WriteBool(_param0 bool) error {
314	ret := _m.ctrl.Call(_m, "WriteBool", _param0)
315	ret0, _ := ret[0].(error)
316	return ret0
317}
318
319func (_mr *_MockTProtocolRecorder) WriteBool(arg0 interface{}) *gomock.Call {
320	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteBool", arg0)
321}
322
323func (_m *MockTProtocol) WriteByte(_param0 byte) error {
324	ret := _m.ctrl.Call(_m, "WriteByte", _param0)
325	ret0, _ := ret[0].(error)
326	return ret0
327}
328
329func (_mr *_MockTProtocolRecorder) WriteByte(arg0 interface{}) *gomock.Call {
330	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteByte", arg0)
331}
332
333func (_m *MockTProtocol) WriteDouble(_param0 float64) error {
334	ret := _m.ctrl.Call(_m, "WriteDouble", _param0)
335	ret0, _ := ret[0].(error)
336	return ret0
337}
338
339func (_mr *_MockTProtocolRecorder) WriteDouble(arg0 interface{}) *gomock.Call {
340	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteDouble", arg0)
341}
342
343func (_m *MockTProtocol) WriteFieldBegin(_param0 string, _param1 thrift.TType, _param2 int16) error {
344	ret := _m.ctrl.Call(_m, "WriteFieldBegin", _param0, _param1, _param2)
345	ret0, _ := ret[0].(error)
346	return ret0
347}
348
349func (_mr *_MockTProtocolRecorder) WriteFieldBegin(arg0, arg1, arg2 interface{}) *gomock.Call {
350	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldBegin", arg0, arg1, arg2)
351}
352
353func (_m *MockTProtocol) WriteFieldEnd() error {
354	ret := _m.ctrl.Call(_m, "WriteFieldEnd")
355	ret0, _ := ret[0].(error)
356	return ret0
357}
358
359func (_mr *_MockTProtocolRecorder) WriteFieldEnd() *gomock.Call {
360	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldEnd")
361}
362
363func (_m *MockTProtocol) WriteFieldStop() error {
364	ret := _m.ctrl.Call(_m, "WriteFieldStop")
365	ret0, _ := ret[0].(error)
366	return ret0
367}
368
369func (_mr *_MockTProtocolRecorder) WriteFieldStop() *gomock.Call {
370	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldStop")
371}
372
373func (_m *MockTProtocol) WriteI16(_param0 int16) error {
374	ret := _m.ctrl.Call(_m, "WriteI16", _param0)
375	ret0, _ := ret[0].(error)
376	return ret0
377}
378
379func (_mr *_MockTProtocolRecorder) WriteI16(arg0 interface{}) *gomock.Call {
380	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI16", arg0)
381}
382
383func (_m *MockTProtocol) WriteI32(_param0 int32) error {
384	ret := _m.ctrl.Call(_m, "WriteI32", _param0)
385	ret0, _ := ret[0].(error)
386	return ret0
387}
388
389func (_mr *_MockTProtocolRecorder) WriteI32(arg0 interface{}) *gomock.Call {
390	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI32", arg0)
391}
392
393func (_m *MockTProtocol) WriteI64(_param0 int64) error {
394	ret := _m.ctrl.Call(_m, "WriteI64", _param0)
395	ret0, _ := ret[0].(error)
396	return ret0
397}
398
399func (_mr *_MockTProtocolRecorder) WriteI64(arg0 interface{}) *gomock.Call {
400	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI64", arg0)
401}
402
403func (_m *MockTProtocol) WriteListBegin(_param0 thrift.TType, _param1 int) error {
404	ret := _m.ctrl.Call(_m, "WriteListBegin", _param0, _param1)
405	ret0, _ := ret[0].(error)
406	return ret0
407}
408
409func (_mr *_MockTProtocolRecorder) WriteListBegin(arg0, arg1 interface{}) *gomock.Call {
410	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteListBegin", arg0, arg1)
411}
412
413func (_m *MockTProtocol) WriteListEnd() error {
414	ret := _m.ctrl.Call(_m, "WriteListEnd")
415	ret0, _ := ret[0].(error)
416	return ret0
417}
418
419func (_mr *_MockTProtocolRecorder) WriteListEnd() *gomock.Call {
420	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteListEnd")
421}
422
423func (_m *MockTProtocol) WriteMapBegin(_param0 thrift.TType, _param1 thrift.TType, _param2 int) error {
424	ret := _m.ctrl.Call(_m, "WriteMapBegin", _param0, _param1, _param2)
425	ret0, _ := ret[0].(error)
426	return ret0
427}
428
429func (_mr *_MockTProtocolRecorder) WriteMapBegin(arg0, arg1, arg2 interface{}) *gomock.Call {
430	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMapBegin", arg0, arg1, arg2)
431}
432
433func (_m *MockTProtocol) WriteMapEnd() error {
434	ret := _m.ctrl.Call(_m, "WriteMapEnd")
435	ret0, _ := ret[0].(error)
436	return ret0
437}
438
439func (_mr *_MockTProtocolRecorder) WriteMapEnd() *gomock.Call {
440	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMapEnd")
441}
442
443func (_m *MockTProtocol) WriteMessageBegin(_param0 string, _param1 thrift.TMessageType, _param2 int32) error {
444	ret := _m.ctrl.Call(_m, "WriteMessageBegin", _param0, _param1, _param2)
445	ret0, _ := ret[0].(error)
446	return ret0
447}
448
449func (_mr *_MockTProtocolRecorder) WriteMessageBegin(arg0, arg1, arg2 interface{}) *gomock.Call {
450	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMessageBegin", arg0, arg1, arg2)
451}
452
453func (_m *MockTProtocol) WriteMessageEnd() error {
454	ret := _m.ctrl.Call(_m, "WriteMessageEnd")
455	ret0, _ := ret[0].(error)
456	return ret0
457}
458
459func (_mr *_MockTProtocolRecorder) WriteMessageEnd() *gomock.Call {
460	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMessageEnd")
461}
462
463func (_m *MockTProtocol) WriteSetBegin(_param0 thrift.TType, _param1 int) error {
464	ret := _m.ctrl.Call(_m, "WriteSetBegin", _param0, _param1)
465	ret0, _ := ret[0].(error)
466	return ret0
467}
468
469func (_mr *_MockTProtocolRecorder) WriteSetBegin(arg0, arg1 interface{}) *gomock.Call {
470	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteSetBegin", arg0, arg1)
471}
472
473func (_m *MockTProtocol) WriteSetEnd() error {
474	ret := _m.ctrl.Call(_m, "WriteSetEnd")
475	ret0, _ := ret[0].(error)
476	return ret0
477}
478
479func (_mr *_MockTProtocolRecorder) WriteSetEnd() *gomock.Call {
480	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteSetEnd")
481}
482
483func (_m *MockTProtocol) WriteString(_param0 string) error {
484	ret := _m.ctrl.Call(_m, "WriteString", _param0)
485	ret0, _ := ret[0].(error)
486	return ret0
487}
488
489func (_mr *_MockTProtocolRecorder) WriteString(arg0 interface{}) *gomock.Call {
490	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteString", arg0)
491}
492
493func (_m *MockTProtocol) WriteStructBegin(_param0 string) error {
494	ret := _m.ctrl.Call(_m, "WriteStructBegin", _param0)
495	ret0, _ := ret[0].(error)
496	return ret0
497}
498
499func (_mr *_MockTProtocolRecorder) WriteStructBegin(arg0 interface{}) *gomock.Call {
500	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteStructBegin", arg0)
501}
502
503func (_m *MockTProtocol) WriteStructEnd() error {
504	ret := _m.ctrl.Call(_m, "WriteStructEnd")
505	ret0, _ := ret[0].(error)
506	return ret0
507}
508
509func (_mr *_MockTProtocolRecorder) WriteStructEnd() *gomock.Call {
510	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteStructEnd")
511}
512
Full Screen

interface_mocks_test.go

Source: interface_mocks_test.go Github

copy
1// Automatically generated by MockGen. DO NOT EDIT!
2// Source: github.com/tarent/lib-compose/composition (interfaces: Fragment,ContentLoader,Content,ContentMerger,ContentParser,ResponseProcessor,Cache)
3
4package composition
5
6import (
7	gomock "github.com/golang/mock/gomock"
8
9	html "golang.org/x/net/html"
10	io "io"
11	http "net/http"
12)
13
14// Mock of Fragment interface
15type MockFragment struct {
16	ctrl     *gomock.Controller
17	recorder *_MockFragmentRecorder
18}
19
20// Recorder for MockFragment (not exported)
21type _MockFragmentRecorder struct {
22	mock *MockFragment
23}
24
25func NewMockFragment(ctrl *gomock.Controller) *MockFragment {
26	mock := &MockFragment{ctrl: ctrl}
27	mock.recorder = &_MockFragmentRecorder{mock}
28	return mock
29}
30
31func (_m *MockFragment) EXPECT() *_MockFragmentRecorder {
32	return _m.recorder
33}
34
35func (_m *MockFragment) Execute(_param0 io.Writer, _param1 map[string]interface{}, _param2 func(string) error) error {
36	ret := _m.ctrl.Call(_m, "Execute", _param0, _param1, _param2)
37	ret0, _ := ret[0].(error)
38	return ret0
39}
40
41func (_mr *_MockFragmentRecorder) Execute(arg0, arg1, arg2 interface{}) *gomock.Call {
42	return _mr.mock.ctrl.RecordCall(_mr.mock, "Execute", arg0, arg1, arg2)
43}
44
45func (_m *MockFragment) MemorySize() int {
46	ret := _m.ctrl.Call(_m, "MemorySize")
47	ret0, _ := ret[0].(int)
48	return ret0
49}
50
51func (_mr *_MockFragmentRecorder) MemorySize() *gomock.Call {
52	return _mr.mock.ctrl.RecordCall(_mr.mock, "MemorySize")
53}
54
55func (_m *MockFragment) Stylesheets() [][]html.Attribute {
56	ret := _m.ctrl.Call(_m, "Stylesheets")
57	ret0, _ := ret[0].([][]html.Attribute)
58	return ret0
59}
60
61func (_mr *_MockFragmentRecorder) Stylesheets() *gomock.Call {
62	return _mr.mock.ctrl.RecordCall(_mr.mock, "Stylesheets")
63}
64
65// Mock of ContentLoader interface
66type MockContentLoader struct {
67	ctrl     *gomock.Controller
68	recorder *_MockContentLoaderRecorder
69}
70
71// Recorder for MockContentLoader (not exported)
72type _MockContentLoaderRecorder struct {
73	mock *MockContentLoader
74}
75
76func NewMockContentLoader(ctrl *gomock.Controller) *MockContentLoader {
77	mock := &MockContentLoader{ctrl: ctrl}
78	mock.recorder = &_MockContentLoaderRecorder{mock}
79	return mock
80}
81
82func (_m *MockContentLoader) EXPECT() *_MockContentLoaderRecorder {
83	return _m.recorder
84}
85
86func (_m *MockContentLoader) Load(_param0 *FetchDefinition) (Content, error) {
87	ret := _m.ctrl.Call(_m, "Load", _param0)
88	ret0, _ := ret[0].(Content)
89	ret1, _ := ret[1].(error)
90	return ret0, ret1
91}
92
93func (_mr *_MockContentLoaderRecorder) Load(arg0 interface{}) *gomock.Call {
94	return _mr.mock.ctrl.RecordCall(_mr.mock, "Load", arg0)
95}
96
97// Mock of Content interface
98type MockContent struct {
99	ctrl     *gomock.Controller
100	recorder *_MockContentRecorder
101}
102
103// Recorder for MockContent (not exported)
104type _MockContentRecorder struct {
105	mock *MockContent
106}
107
108func NewMockContent(ctrl *gomock.Controller) *MockContent {
109	mock := &MockContent{ctrl: ctrl}
110	mock.recorder = &_MockContentRecorder{mock}
111	return mock
112}
113
114func (_m *MockContent) EXPECT() *_MockContentRecorder {
115	return _m.recorder
116}
117
118func (_m *MockContent) Body() map[string]Fragment {
119	ret := _m.ctrl.Call(_m, "Body")
120	ret0, _ := ret[0].(map[string]Fragment)
121	return ret0
122}
123
124func (_mr *_MockContentRecorder) Body() *gomock.Call {
125	return _mr.mock.ctrl.RecordCall(_mr.mock, "Body")
126}
127
128func (_m *MockContent) BodyAttributes() Fragment {
129	ret := _m.ctrl.Call(_m, "BodyAttributes")
130	ret0, _ := ret[0].(Fragment)
131	return ret0
132}
133
134func (_mr *_MockContentRecorder) BodyAttributes() *gomock.Call {
135	return _mr.mock.ctrl.RecordCall(_mr.mock, "BodyAttributes")
136}
137
138func (_m *MockContent) BodyAttributesArray() []html.Attribute {
139	ret := _m.ctrl.Call(_m, "BodyAttributesArray")
140	ret0, _ := ret[0].([]html.Attribute)
141	return ret0
142}
143
144func (_mr *_MockContentRecorder) BodyAttributesArray() *gomock.Call {
145	return _mr.mock.ctrl.RecordCall(_mr.mock, "BodyAttributesArray")
146}
147
148func (_m *MockContent) Dependencies() map[string]Params {
149	ret := _m.ctrl.Call(_m, "Dependencies")
150	ret0, _ := ret[0].(map[string]Params)
151	return ret0
152}
153
154func (_mr *_MockContentRecorder) Dependencies() *gomock.Call {
155	return _mr.mock.ctrl.RecordCall(_mr.mock, "Dependencies")
156}
157
158func (_m *MockContent) Head() Fragment {
159	ret := _m.ctrl.Call(_m, "Head")
160	ret0, _ := ret[0].(Fragment)
161	return ret0
162}
163
164func (_mr *_MockContentRecorder) Head() *gomock.Call {
165	return _mr.mock.ctrl.RecordCall(_mr.mock, "Head")
166}
167
168func (_m *MockContent) HttpHeader() http.Header {
169	ret := _m.ctrl.Call(_m, "HttpHeader")
170	ret0, _ := ret[0].(http.Header)
171	return ret0
172}
173
174func (_mr *_MockContentRecorder) HttpHeader() *gomock.Call {
175	return _mr.mock.ctrl.RecordCall(_mr.mock, "HttpHeader")
176}
177
178func (_m *MockContent) HttpStatusCode() int {
179	ret := _m.ctrl.Call(_m, "HttpStatusCode")
180	ret0, _ := ret[0].(int)
181	return ret0
182}
183
184func (_mr *_MockContentRecorder) HttpStatusCode() *gomock.Call {
185	return _mr.mock.ctrl.RecordCall(_mr.mock, "HttpStatusCode")
186}
187
188func (_m *MockContent) MemorySize() int {
189	ret := _m.ctrl.Call(_m, "MemorySize")
190	ret0, _ := ret[0].(int)
191	return ret0
192}
193
194func (_mr *_MockContentRecorder) MemorySize() *gomock.Call {
195	return _mr.mock.ctrl.RecordCall(_mr.mock, "MemorySize")
196}
197
198func (_m *MockContent) Meta() map[string]interface{} {
199	ret := _m.ctrl.Call(_m, "Meta")
200	ret0, _ := ret[0].(map[string]interface{})
201	return ret0
202}
203
204func (_mr *_MockContentRecorder) Meta() *gomock.Call {
205	return _mr.mock.ctrl.RecordCall(_mr.mock, "Meta")
206}
207
208func (_m *MockContent) Name() string {
209	ret := _m.ctrl.Call(_m, "Name")
210	ret0, _ := ret[0].(string)
211	return ret0
212}
213
214func (_mr *_MockContentRecorder) Name() *gomock.Call {
215	return _mr.mock.ctrl.RecordCall(_mr.mock, "Name")
216}
217
218func (_m *MockContent) Reader() io.ReadCloser {
219	ret := _m.ctrl.Call(_m, "Reader")
220	ret0, _ := ret[0].(io.ReadCloser)
221	return ret0
222}
223
224func (_mr *_MockContentRecorder) Reader() *gomock.Call {
225	return _mr.mock.ctrl.RecordCall(_mr.mock, "Reader")
226}
227
228func (_m *MockContent) RequiredContent() []*FetchDefinition {
229	ret := _m.ctrl.Call(_m, "RequiredContent")
230	ret0, _ := ret[0].([]*FetchDefinition)
231	return ret0
232}
233
234func (_mr *_MockContentRecorder) RequiredContent() *gomock.Call {
235	return _mr.mock.ctrl.RecordCall(_mr.mock, "RequiredContent")
236}
237
238func (_m *MockContent) Tail() Fragment {
239	ret := _m.ctrl.Call(_m, "Tail")
240	ret0, _ := ret[0].(Fragment)
241	return ret0
242}
243
244func (_mr *_MockContentRecorder) Tail() *gomock.Call {
245	return _mr.mock.ctrl.RecordCall(_mr.mock, "Tail")
246}
247
248// Mock of ContentMerger interface
249type MockContentMerger struct {
250	ctrl     *gomock.Controller
251	recorder *_MockContentMergerRecorder
252}
253
254// Recorder for MockContentMerger (not exported)
255type _MockContentMergerRecorder struct {
256	mock *MockContentMerger
257}
258
259func NewMockContentMerger(ctrl *gomock.Controller) *MockContentMerger {
260	mock := &MockContentMerger{ctrl: ctrl}
261	mock.recorder = &_MockContentMergerRecorder{mock}
262	return mock
263}
264
265func (_m *MockContentMerger) EXPECT() *_MockContentMergerRecorder {
266	return _m.recorder
267}
268
269func (_m *MockContentMerger) AddContent(_param0 Content, _param1 int) {
270	_m.ctrl.Call(_m, "AddContent", _param0, _param1)
271}
272
273func (_mr *_MockContentMergerRecorder) AddContent(arg0, arg1 interface{}) *gomock.Call {
274	return _mr.mock.ctrl.RecordCall(_mr.mock, "AddContent", arg0, arg1)
275}
276
277func (_m *MockContentMerger) GetHtml() ([]byte, error) {
278	ret := _m.ctrl.Call(_m, "GetHtml")
279	ret0, _ := ret[0].([]byte)
280	ret1, _ := ret[1].(error)
281	return ret0, ret1
282}
283
284func (_mr *_MockContentMergerRecorder) GetHtml() *gomock.Call {
285	return _mr.mock.ctrl.RecordCall(_mr.mock, "GetHtml")
286}
287
288func (_m *MockContentMerger) SetDeduplicationStrategy(_param0 StylesheetDeduplicationStrategy) {
289	_m.ctrl.Call(_m, "SetDeduplicationStrategy", _param0)
290}
291
292func (_mr *_MockContentMergerRecorder) SetDeduplicationStrategy(arg0 interface{}) *gomock.Call {
293	return _mr.mock.ctrl.RecordCall(_mr.mock, "SetDeduplicationStrategy", arg0)
294}
295
296// Mock of ContentParser interface
297type MockContentParser struct {
298	ctrl     *gomock.Controller
299	recorder *_MockContentParserRecorder
300}
301
302// Recorder for MockContentParser (not exported)
303type _MockContentParserRecorder struct {
304	mock *MockContentParser
305}
306
307func NewMockContentParser(ctrl *gomock.Controller) *MockContentParser {
308	mock := &MockContentParser{ctrl: ctrl}
309	mock.recorder = &_MockContentParserRecorder{mock}
310	return mock
311}
312
313func (_m *MockContentParser) EXPECT() *_MockContentParserRecorder {
314	return _m.recorder
315}
316
317func (_m *MockContentParser) Parse(_param0 *MemoryContent, _param1 io.Reader) error {
318	ret := _m.ctrl.Call(_m, "Parse", _param0, _param1)
319	ret0, _ := ret[0].(error)
320	return ret0
321}
322
323func (_mr *_MockContentParserRecorder) Parse(arg0, arg1 interface{}) *gomock.Call {
324	return _mr.mock.ctrl.RecordCall(_mr.mock, "Parse", arg0, arg1)
325}
326
327// Mock of ResponseProcessor interface
328type MockResponseProcessor struct {
329	ctrl     *gomock.Controller
330	recorder *_MockResponseProcessorRecorder
331}
332
333// Recorder for MockResponseProcessor (not exported)
334type _MockResponseProcessorRecorder struct {
335	mock *MockResponseProcessor
336}
337
338func NewMockResponseProcessor(ctrl *gomock.Controller) *MockResponseProcessor {
339	mock := &MockResponseProcessor{ctrl: ctrl}
340	mock.recorder = &_MockResponseProcessorRecorder{mock}
341	return mock
342}
343
344func (_m *MockResponseProcessor) EXPECT() *_MockResponseProcessorRecorder {
345	return _m.recorder
346}
347
348func (_m *MockResponseProcessor) Process(_param0 *http.Response, _param1 string) error {
349	ret := _m.ctrl.Call(_m, "Process", _param0, _param1)
350	ret0, _ := ret[0].(error)
351	return ret0
352}
353
354func (_mr *_MockResponseProcessorRecorder) Process(arg0, arg1 interface{}) *gomock.Call {
355	return _mr.mock.ctrl.RecordCall(_mr.mock, "Process", arg0, arg1)
356}
357
358// Mock of Cache interface
359type MockCache struct {
360	ctrl     *gomock.Controller
361	recorder *_MockCacheRecorder
362}
363
364// Recorder for MockCache (not exported)
365type _MockCacheRecorder struct {
366	mock *MockCache
367}
368
369func NewMockCache(ctrl *gomock.Controller) *MockCache {
370	mock := &MockCache{ctrl: ctrl}
371	mock.recorder = &_MockCacheRecorder{mock}
372	return mock
373}
374
375func (_m *MockCache) EXPECT() *_MockCacheRecorder {
376	return _m.recorder
377}
378
379func (_m *MockCache) Get(_param0 string) (interface{}, bool) {
380	ret := _m.ctrl.Call(_m, "Get", _param0)
381	ret0, _ := ret[0].(interface{})
382	ret1, _ := ret[1].(bool)
383	return ret0, ret1
384}
385
386func (_mr *_MockCacheRecorder) Get(arg0 interface{}) *gomock.Call {
387	return _mr.mock.ctrl.RecordCall(_mr.mock, "Get", arg0)
388}
389
390func (_m *MockCache) Invalidate() {
391	_m.ctrl.Call(_m, "Invalidate")
392}
393
394func (_mr *_MockCacheRecorder) Invalidate() *gomock.Call {
395	return _mr.mock.ctrl.RecordCall(_mr.mock, "Invalidate")
396}
397
398func (_m *MockCache) PurgeEntries(_param0 []string) {
399	_m.ctrl.Call(_m, "PurgeEntries", _param0)
400}
401
402func (_mr *_MockCacheRecorder) PurgeEntries(arg0 interface{}) *gomock.Call {
403	return _mr.mock.ctrl.RecordCall(_mr.mock, "PurgeEntries", arg0)
404}
405
406func (_m *MockCache) Set(_param0 string, _param1 string, _param2 int, _param3 interface{}) {
407	_m.ctrl.Call(_m, "Set", _param0, _param1, _param2, _param3)
408}
409
410func (_mr *_MockCacheRecorder) Set(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
411	return _mr.mock.ctrl.RecordCall(_mr.mock, "Set", arg0, arg1, arg2, arg3)
412}
413
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)