/
GDO.go
106 lines (84 loc) · 2.64 KB
/
GDO.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Code generated by mockery v2.36.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// GDO is an autogenerated mock type for the GDO type
type GDO struct {
mock.Mock
}
type GDO_Expecter struct {
mock *mock.Mock
}
func (_m *GDO) EXPECT() *GDO_Expecter {
return &GDO_Expecter{mock: &_m.Mock}
}
// ProcessShutdown provides a mock function with given fields:
func (_m *GDO) ProcessShutdown() {
_m.Called()
}
// GDO_ProcessShutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessShutdown'
type GDO_ProcessShutdown_Call struct {
*mock.Call
}
// ProcessShutdown is a helper method to define mock.On call
func (_e *GDO_Expecter) ProcessShutdown() *GDO_ProcessShutdown_Call {
return &GDO_ProcessShutdown_Call{Call: _e.mock.On("ProcessShutdown")}
}
func (_c *GDO_ProcessShutdown_Call) Run(run func()) *GDO_ProcessShutdown_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *GDO_ProcessShutdown_Call) Return() *GDO_ProcessShutdown_Call {
_c.Call.Return()
return _c
}
func (_c *GDO_ProcessShutdown_Call) RunAndReturn(run func()) *GDO_ProcessShutdown_Call {
_c.Call.Return(run)
return _c
}
// SetGarageDoor provides a mock function with given fields: action
func (_m *GDO) SetGarageDoor(action string) error {
ret := _m.Called(action)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(action)
} else {
r0 = ret.Error(0)
}
return r0
}
// GDO_SetGarageDoor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGarageDoor'
type GDO_SetGarageDoor_Call struct {
*mock.Call
}
// SetGarageDoor is a helper method to define mock.On call
// - action string
func (_e *GDO_Expecter) SetGarageDoor(action interface{}) *GDO_SetGarageDoor_Call {
return &GDO_SetGarageDoor_Call{Call: _e.mock.On("SetGarageDoor", action)}
}
func (_c *GDO_SetGarageDoor_Call) Run(run func(action string)) *GDO_SetGarageDoor_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *GDO_SetGarageDoor_Call) Return(err error) *GDO_SetGarageDoor_Call {
_c.Call.Return(err)
return _c
}
func (_c *GDO_SetGarageDoor_Call) RunAndReturn(run func(string) error) *GDO_SetGarageDoor_Call {
_c.Call.Return(run)
return _c
}
// NewGDO creates a new instance of GDO. 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 NewGDO(t interface {
mock.TestingT
Cleanup(func())
}) *GDO {
mock := &GDO{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}