-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmocks.go
More file actions
82 lines (66 loc) · 2.06 KB
/
mocks.go
File metadata and controls
82 lines (66 loc) · 2.06 KB
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
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package cmd
import (
mock "github.com/stretchr/testify/mock"
"io"
)
// NewMockOMSUpdater creates a new instance of MockOMSUpdater. 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 NewMockOMSUpdater(t interface {
mock.TestingT
Cleanup(func())
}) *MockOMSUpdater {
mock := &MockOMSUpdater{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockOMSUpdater is an autogenerated mock type for the OMSUpdater type
type MockOMSUpdater struct {
mock.Mock
}
type MockOMSUpdater_Expecter struct {
mock *mock.Mock
}
func (_m *MockOMSUpdater) EXPECT() *MockOMSUpdater_Expecter {
return &MockOMSUpdater_Expecter{mock: &_m.Mock}
}
// Apply provides a mock function for the type MockOMSUpdater
func (_mock *MockOMSUpdater) Apply(update io.Reader) error {
ret := _mock.Called(update)
if len(ret) == 0 {
panic("no return value specified for Apply")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(io.Reader) error); ok {
r0 = returnFunc(update)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockOMSUpdater_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'
type MockOMSUpdater_Apply_Call struct {
*mock.Call
}
// Apply is a helper method to define mock.On call
// - update
func (_e *MockOMSUpdater_Expecter) Apply(update interface{}) *MockOMSUpdater_Apply_Call {
return &MockOMSUpdater_Apply_Call{Call: _e.mock.On("Apply", update)}
}
func (_c *MockOMSUpdater_Apply_Call) Run(run func(update io.Reader)) *MockOMSUpdater_Apply_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(io.Reader))
})
return _c
}
func (_c *MockOMSUpdater_Apply_Call) Return(err error) *MockOMSUpdater_Apply_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockOMSUpdater_Apply_Call) RunAndReturn(run func(update io.Reader) error) *MockOMSUpdater_Apply_Call {
_c.Call.Return(run)
return _c
}