This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
forked from raystack/dex
/
ObjectIterator.go
88 lines (71 loc) · 2.17 KB
/
ObjectIterator.go
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
// Code generated by mockery v2.30.1. DO NOT EDIT.
package mocks
import (
storage "cloud.google.com/go/storage"
mock "github.com/stretchr/testify/mock"
)
// ObjectIterator is an autogenerated mock type for the ObjectIterator type
type ObjectIterator struct {
mock.Mock
}
type ObjectIterator_Expecter struct {
mock *mock.Mock
}
func (_m *ObjectIterator) EXPECT() *ObjectIterator_Expecter {
return &ObjectIterator_Expecter{mock: &_m.Mock}
}
// Next provides a mock function with given fields:
func (_m *ObjectIterator) Next() (*storage.ObjectAttrs, error) {
ret := _m.Called()
var r0 *storage.ObjectAttrs
var r1 error
if rf, ok := ret.Get(0).(func() (*storage.ObjectAttrs, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *storage.ObjectAttrs); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*storage.ObjectAttrs)
}
}
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ObjectIterator_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
type ObjectIterator_Next_Call struct {
*mock.Call
}
// Next is a helper method to define mock.On call
func (_e *ObjectIterator_Expecter) Next() *ObjectIterator_Next_Call {
return &ObjectIterator_Next_Call{Call: _e.mock.On("Next")}
}
func (_c *ObjectIterator_Next_Call) Run(run func()) *ObjectIterator_Next_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *ObjectIterator_Next_Call) Return(_a0 *storage.ObjectAttrs, _a1 error) *ObjectIterator_Next_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *ObjectIterator_Next_Call) RunAndReturn(run func() (*storage.ObjectAttrs, error)) *ObjectIterator_Next_Call {
_c.Call.Return(run)
return _c
}
// NewObjectIterator creates a new instance of ObjectIterator. 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 NewObjectIterator(t interface {
mock.TestingT
Cleanup(func())
}) *ObjectIterator {
mock := &ObjectIterator{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}