/
mock_metrics.go
147 lines (116 loc) · 3.74 KB
/
mock_metrics.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
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
// Code generated by mockery v2.27.1. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// Metrics is an autogenerated mock type for the Metrics type
type Metrics struct {
mock.Mock
}
type Metrics_Expecter struct {
mock *mock.Mock
}
func (_m *Metrics) EXPECT() *Metrics_Expecter {
return &Metrics_Expecter{mock: &_m.Mock}
}
// GetThroughput provides a mock function with given fields:
func (_m *Metrics) GetThroughput() uint64 {
ret := _m.Called()
var r0 uint64
if rf, ok := ret.Get(0).(func() uint64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uint64)
}
return r0
}
// Metrics_GetThroughput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetThroughput'
type Metrics_GetThroughput_Call struct {
*mock.Call
}
// GetThroughput is a helper method to define mock.On call
func (_e *Metrics_Expecter) GetThroughput() *Metrics_GetThroughput_Call {
return &Metrics_GetThroughput_Call{Call: _e.mock.On("GetThroughput")}
}
func (_c *Metrics_GetThroughput_Call) Run(run func()) *Metrics_GetThroughput_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Metrics_GetThroughput_Call) Return(_a0 uint64) *Metrics_GetThroughput_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Metrics_GetThroughput_Call) RunAndReturn(run func() uint64) *Metrics_GetThroughput_Call {
_c.Call.Return(run)
return _c
}
// IncrementThroughput provides a mock function with given fields:
func (_m *Metrics) IncrementThroughput() {
_m.Called()
}
// Metrics_IncrementThroughput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementThroughput'
type Metrics_IncrementThroughput_Call struct {
*mock.Call
}
// IncrementThroughput is a helper method to define mock.On call
func (_e *Metrics_Expecter) IncrementThroughput() *Metrics_IncrementThroughput_Call {
return &Metrics_IncrementThroughput_Call{Call: _e.mock.On("IncrementThroughput")}
}
func (_c *Metrics_IncrementThroughput_Call) Run(run func()) *Metrics_IncrementThroughput_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Metrics_IncrementThroughput_Call) Return() *Metrics_IncrementThroughput_Call {
_c.Call.Return()
return _c
}
func (_c *Metrics_IncrementThroughput_Call) RunAndReturn(run func()) *Metrics_IncrementThroughput_Call {
_c.Call.Return(run)
return _c
}
// SendMetrics provides a mock function with given fields:
func (_m *Metrics) SendMetrics() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// Metrics_SendMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMetrics'
type Metrics_SendMetrics_Call struct {
*mock.Call
}
// SendMetrics is a helper method to define mock.On call
func (_e *Metrics_Expecter) SendMetrics() *Metrics_SendMetrics_Call {
return &Metrics_SendMetrics_Call{Call: _e.mock.On("SendMetrics")}
}
func (_c *Metrics_SendMetrics_Call) Run(run func()) *Metrics_SendMetrics_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Metrics_SendMetrics_Call) Return(_a0 error) *Metrics_SendMetrics_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Metrics_SendMetrics_Call) RunAndReturn(run func() error) *Metrics_SendMetrics_Call {
_c.Call.Return(run)
return _c
}
type mockConstructorTestingTNewMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewMetrics creates a new instance of Metrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMetrics(t mockConstructorTestingTNewMetrics) *Metrics {
mock := &Metrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}