aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/coveragedb/mocks/RowIterator.go
blob: 055039af615948968c5c9fe5319227bfcd46569e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"github.com/google/syzkaller/pkg/coveragedb/spannerclient"
	mock "github.com/stretchr/testify/mock"
)

// NewRowIterator creates a new instance of RowIterator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewRowIterator(t interface {
	mock.TestingT
	Cleanup(func())
}) *RowIterator {
	mock := &RowIterator{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

// RowIterator is an autogenerated mock type for the RowIterator type
type RowIterator struct {
	mock.Mock
}

type RowIterator_Expecter struct {
	mock *mock.Mock
}

func (_m *RowIterator) EXPECT() *RowIterator_Expecter {
	return &RowIterator_Expecter{mock: &_m.Mock}
}

// Next provides a mock function for the type RowIterator
func (_mock *RowIterator) Next() (spannerclient.Row, error) {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for Next")
	}

	var r0 spannerclient.Row
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (spannerclient.Row, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() spannerclient.Row); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(spannerclient.Row)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// RowIterator_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
type RowIterator_Next_Call struct {
	*mock.Call
}

// Next is a helper method to define mock.On call
func (_e *RowIterator_Expecter) Next() *RowIterator_Next_Call {
	return &RowIterator_Next_Call{Call: _e.mock.On("Next")}
}

func (_c *RowIterator_Next_Call) Run(run func()) *RowIterator_Next_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *RowIterator_Next_Call) Return(row spannerclient.Row, err error) *RowIterator_Next_Call {
	_c.Call.Return(row, err)
	return _c
}

func (_c *RowIterator_Next_Call) RunAndReturn(run func() (spannerclient.Row, error)) *RowIterator_Next_Call {
	_c.Call.Return(run)
	return _c
}

// Stop provides a mock function for the type RowIterator
func (_mock *RowIterator) Stop() {
	_mock.Called()
	return
}

// RowIterator_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
type RowIterator_Stop_Call struct {
	*mock.Call
}

// Stop is a helper method to define mock.On call
func (_e *RowIterator_Expecter) Stop() *RowIterator_Stop_Call {
	return &RowIterator_Stop_Call{Call: _e.mock.On("Stop")}
}

func (_c *RowIterator_Stop_Call) Run(run func()) *RowIterator_Stop_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *RowIterator_Stop_Call) Return() *RowIterator_Stop_Call {
	_c.Call.Return()
	return _c
}

func (_c *RowIterator_Stop_Call) RunAndReturn(run func()) *RowIterator_Stop_Call {
	_c.Run(run)
	return _c
}