-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathmock_smart_charging_charge_point_handler.go
More file actions
209 lines (171 loc) · 8.73 KB
/
Copy pathmock_smart_charging_charge_point_handler.go
File metadata and controls
209 lines (171 loc) · 8.73 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
// Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
smartcharging "github.com/lorenzodonini/ocpp-go/ocpp1.6/smartcharging"
mock "github.com/stretchr/testify/mock"
)
// MockSmartChargingChargePointHandler is an autogenerated mock type for the ChargePointHandler type
type MockSmartChargingChargePointHandler struct {
mock.Mock
}
type MockSmartChargingChargePointHandler_Expecter struct {
mock *mock.Mock
}
func (_m *MockSmartChargingChargePointHandler) EXPECT() *MockSmartChargingChargePointHandler_Expecter {
return &MockSmartChargingChargePointHandler_Expecter{mock: &_m.Mock}
}
// OnClearChargingProfile provides a mock function with given fields: request
func (_m *MockSmartChargingChargePointHandler) OnClearChargingProfile(request *smartcharging.ClearChargingProfileRequest) (*smartcharging.ClearChargingProfileConfirmation, error) {
ret := _m.Called(request)
if len(ret) == 0 {
panic("no return value specified for OnClearChargingProfile")
}
var r0 *smartcharging.ClearChargingProfileConfirmation
var r1 error
if rf, ok := ret.Get(0).(func(*smartcharging.ClearChargingProfileRequest) (*smartcharging.ClearChargingProfileConfirmation, error)); ok {
return rf(request)
}
if rf, ok := ret.Get(0).(func(*smartcharging.ClearChargingProfileRequest) *smartcharging.ClearChargingProfileConfirmation); ok {
r0 = rf(request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*smartcharging.ClearChargingProfileConfirmation)
}
}
if rf, ok := ret.Get(1).(func(*smartcharging.ClearChargingProfileRequest) error); ok {
r1 = rf(request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockSmartChargingChargePointHandler_OnClearChargingProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnClearChargingProfile'
type MockSmartChargingChargePointHandler_OnClearChargingProfile_Call struct {
*mock.Call
}
// OnClearChargingProfile is a helper method to define mock.On call
// - request *smartcharging.ClearChargingProfileRequest
func (_e *MockSmartChargingChargePointHandler_Expecter) OnClearChargingProfile(request interface{}) *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call {
return &MockSmartChargingChargePointHandler_OnClearChargingProfile_Call{Call: _e.mock.On("OnClearChargingProfile", request)}
}
func (_c *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call) Run(run func(request *smartcharging.ClearChargingProfileRequest)) *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*smartcharging.ClearChargingProfileRequest))
})
return _c
}
func (_c *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call) Return(confirmation *smartcharging.ClearChargingProfileConfirmation, err error) *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call {
_c.Call.Return(confirmation, err)
return _c
}
func (_c *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call) RunAndReturn(run func(*smartcharging.ClearChargingProfileRequest) (*smartcharging.ClearChargingProfileConfirmation, error)) *MockSmartChargingChargePointHandler_OnClearChargingProfile_Call {
_c.Call.Return(run)
return _c
}
// OnGetCompositeSchedule provides a mock function with given fields: request
func (_m *MockSmartChargingChargePointHandler) OnGetCompositeSchedule(request *smartcharging.GetCompositeScheduleRequest) (*smartcharging.GetCompositeScheduleConfirmation, error) {
ret := _m.Called(request)
if len(ret) == 0 {
panic("no return value specified for OnGetCompositeSchedule")
}
var r0 *smartcharging.GetCompositeScheduleConfirmation
var r1 error
if rf, ok := ret.Get(0).(func(*smartcharging.GetCompositeScheduleRequest) (*smartcharging.GetCompositeScheduleConfirmation, error)); ok {
return rf(request)
}
if rf, ok := ret.Get(0).(func(*smartcharging.GetCompositeScheduleRequest) *smartcharging.GetCompositeScheduleConfirmation); ok {
r0 = rf(request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*smartcharging.GetCompositeScheduleConfirmation)
}
}
if rf, ok := ret.Get(1).(func(*smartcharging.GetCompositeScheduleRequest) error); ok {
r1 = rf(request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnGetCompositeSchedule'
type MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call struct {
*mock.Call
}
// OnGetCompositeSchedule is a helper method to define mock.On call
// - request *smartcharging.GetCompositeScheduleRequest
func (_e *MockSmartChargingChargePointHandler_Expecter) OnGetCompositeSchedule(request interface{}) *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call {
return &MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call{Call: _e.mock.On("OnGetCompositeSchedule", request)}
}
func (_c *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call) Run(run func(request *smartcharging.GetCompositeScheduleRequest)) *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*smartcharging.GetCompositeScheduleRequest))
})
return _c
}
func (_c *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call) Return(confirmation *smartcharging.GetCompositeScheduleConfirmation, err error) *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call {
_c.Call.Return(confirmation, err)
return _c
}
func (_c *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call) RunAndReturn(run func(*smartcharging.GetCompositeScheduleRequest) (*smartcharging.GetCompositeScheduleConfirmation, error)) *MockSmartChargingChargePointHandler_OnGetCompositeSchedule_Call {
_c.Call.Return(run)
return _c
}
// OnSetChargingProfile provides a mock function with given fields: request
func (_m *MockSmartChargingChargePointHandler) OnSetChargingProfile(request *smartcharging.SetChargingProfileRequest) (*smartcharging.SetChargingProfileConfirmation, error) {
ret := _m.Called(request)
if len(ret) == 0 {
panic("no return value specified for OnSetChargingProfile")
}
var r0 *smartcharging.SetChargingProfileConfirmation
var r1 error
if rf, ok := ret.Get(0).(func(*smartcharging.SetChargingProfileRequest) (*smartcharging.SetChargingProfileConfirmation, error)); ok {
return rf(request)
}
if rf, ok := ret.Get(0).(func(*smartcharging.SetChargingProfileRequest) *smartcharging.SetChargingProfileConfirmation); ok {
r0 = rf(request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*smartcharging.SetChargingProfileConfirmation)
}
}
if rf, ok := ret.Get(1).(func(*smartcharging.SetChargingProfileRequest) error); ok {
r1 = rf(request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockSmartChargingChargePointHandler_OnSetChargingProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnSetChargingProfile'
type MockSmartChargingChargePointHandler_OnSetChargingProfile_Call struct {
*mock.Call
}
// OnSetChargingProfile is a helper method to define mock.On call
// - request *smartcharging.SetChargingProfileRequest
func (_e *MockSmartChargingChargePointHandler_Expecter) OnSetChargingProfile(request interface{}) *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call {
return &MockSmartChargingChargePointHandler_OnSetChargingProfile_Call{Call: _e.mock.On("OnSetChargingProfile", request)}
}
func (_c *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call) Run(run func(request *smartcharging.SetChargingProfileRequest)) *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*smartcharging.SetChargingProfileRequest))
})
return _c
}
func (_c *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call) Return(confirmation *smartcharging.SetChargingProfileConfirmation, err error) *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call {
_c.Call.Return(confirmation, err)
return _c
}
func (_c *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call) RunAndReturn(run func(*smartcharging.SetChargingProfileRequest) (*smartcharging.SetChargingProfileConfirmation, error)) *MockSmartChargingChargePointHandler_OnSetChargingProfile_Call {
_c.Call.Return(run)
return _c
}
// NewMockSmartChargingChargePointHandler creates a new instance of MockSmartChargingChargePointHandler. 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 NewMockSmartChargingChargePointHandler(t interface {
mock.TestingT
Cleanup(func())
}) *MockSmartChargingChargePointHandler {
mock := &MockSmartChargingChargePointHandler{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}