-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_float64updowncounter.go
118 lines (97 loc) · 3.85 KB
/
mock_float64updowncounter.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
// Code generated by mockery. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
metric "go.opentelemetry.io/otel/metric"
)
// MockFloat64UpDownCounter is an autogenerated mock type for the Float64UpDownCounter type
type MockFloat64UpDownCounter struct {
mock.Mock
}
type MockFloat64UpDownCounter_Expecter struct {
mock *mock.Mock
}
func (_m *MockFloat64UpDownCounter) EXPECT() *MockFloat64UpDownCounter_Expecter {
return &MockFloat64UpDownCounter_Expecter{mock: &_m.Mock}
}
// Add provides a mock function with given fields: ctx, incr, options
func (_m *MockFloat64UpDownCounter) Add(ctx context.Context, incr float64, options ...metric.AddOption) {
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, incr)
_ca = append(_ca, _va...)
_m.Called(_ca...)
}
// MockFloat64UpDownCounter_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
type MockFloat64UpDownCounter_Add_Call struct {
*mock.Call
}
// Add is a helper method to define mock.On call
// - ctx context.Context
// - incr float64
// - options ...metric.AddOption
func (_e *MockFloat64UpDownCounter_Expecter) Add(ctx interface{}, incr interface{}, options ...interface{}) *MockFloat64UpDownCounter_Add_Call {
return &MockFloat64UpDownCounter_Add_Call{Call: _e.mock.On("Add",
append([]interface{}{ctx, incr}, options...)...)}
}
func (_c *MockFloat64UpDownCounter_Add_Call) Run(run func(ctx context.Context, incr float64, options ...metric.AddOption)) *MockFloat64UpDownCounter_Add_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]metric.AddOption, len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(metric.AddOption)
}
}
run(args[0].(context.Context), args[1].(float64), variadicArgs...)
})
return _c
}
func (_c *MockFloat64UpDownCounter_Add_Call) Return() *MockFloat64UpDownCounter_Add_Call {
_c.Call.Return()
return _c
}
func (_c *MockFloat64UpDownCounter_Add_Call) RunAndReturn(run func(context.Context, float64, ...metric.AddOption)) *MockFloat64UpDownCounter_Add_Call {
_c.Call.Return(run)
return _c
}
// float64UpDownCounter provides a mock function with given fields:
func (_m *MockFloat64UpDownCounter) float64UpDownCounter() {
_m.Called()
}
// MockFloat64UpDownCounter_float64UpDownCounter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'float64UpDownCounter'
type MockFloat64UpDownCounter_float64UpDownCounter_Call struct {
*mock.Call
}
// float64UpDownCounter is a helper method to define mock.On call
func (_e *MockFloat64UpDownCounter_Expecter) float64UpDownCounter() *MockFloat64UpDownCounter_float64UpDownCounter_Call {
return &MockFloat64UpDownCounter_float64UpDownCounter_Call{Call: _e.mock.On("float64UpDownCounter")}
}
func (_c *MockFloat64UpDownCounter_float64UpDownCounter_Call) Run(run func()) *MockFloat64UpDownCounter_float64UpDownCounter_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockFloat64UpDownCounter_float64UpDownCounter_Call) Return() *MockFloat64UpDownCounter_float64UpDownCounter_Call {
_c.Call.Return()
return _c
}
func (_c *MockFloat64UpDownCounter_float64UpDownCounter_Call) RunAndReturn(run func()) *MockFloat64UpDownCounter_float64UpDownCounter_Call {
_c.Call.Return(run)
return _c
}
// NewMockFloat64UpDownCounter creates a new instance of MockFloat64UpDownCounter. 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 NewMockFloat64UpDownCounter(t interface {
mock.TestingT
Cleanup(func())
}) *MockFloat64UpDownCounter {
mock := &MockFloat64UpDownCounter{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}