-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_int64histogram.go
118 lines (97 loc) · 3.6 KB
/
mock_int64histogram.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"
)
// MockInt64Histogram is an autogenerated mock type for the Int64Histogram type
type MockInt64Histogram struct {
mock.Mock
}
type MockInt64Histogram_Expecter struct {
mock *mock.Mock
}
func (_m *MockInt64Histogram) EXPECT() *MockInt64Histogram_Expecter {
return &MockInt64Histogram_Expecter{mock: &_m.Mock}
}
// Record provides a mock function with given fields: ctx, incr, options
func (_m *MockInt64Histogram) Record(ctx context.Context, incr int64, options ...metric.RecordOption) {
_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...)
}
// MockInt64Histogram_Record_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Record'
type MockInt64Histogram_Record_Call struct {
*mock.Call
}
// Record is a helper method to define mock.On call
// - ctx context.Context
// - incr int64
// - options ...metric.RecordOption
func (_e *MockInt64Histogram_Expecter) Record(ctx interface{}, incr interface{}, options ...interface{}) *MockInt64Histogram_Record_Call {
return &MockInt64Histogram_Record_Call{Call: _e.mock.On("Record",
append([]interface{}{ctx, incr}, options...)...)}
}
func (_c *MockInt64Histogram_Record_Call) Run(run func(ctx context.Context, incr int64, options ...metric.RecordOption)) *MockInt64Histogram_Record_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]metric.RecordOption, len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(metric.RecordOption)
}
}
run(args[0].(context.Context), args[1].(int64), variadicArgs...)
})
return _c
}
func (_c *MockInt64Histogram_Record_Call) Return() *MockInt64Histogram_Record_Call {
_c.Call.Return()
return _c
}
func (_c *MockInt64Histogram_Record_Call) RunAndReturn(run func(context.Context, int64, ...metric.RecordOption)) *MockInt64Histogram_Record_Call {
_c.Call.Return(run)
return _c
}
// int64Histogram provides a mock function with given fields:
func (_m *MockInt64Histogram) int64Histogram() {
_m.Called()
}
// MockInt64Histogram_int64Histogram_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'int64Histogram'
type MockInt64Histogram_int64Histogram_Call struct {
*mock.Call
}
// int64Histogram is a helper method to define mock.On call
func (_e *MockInt64Histogram_Expecter) int64Histogram() *MockInt64Histogram_int64Histogram_Call {
return &MockInt64Histogram_int64Histogram_Call{Call: _e.mock.On("int64Histogram")}
}
func (_c *MockInt64Histogram_int64Histogram_Call) Run(run func()) *MockInt64Histogram_int64Histogram_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockInt64Histogram_int64Histogram_Call) Return() *MockInt64Histogram_int64Histogram_Call {
_c.Call.Return()
return _c
}
func (_c *MockInt64Histogram_int64Histogram_Call) RunAndReturn(run func()) *MockInt64Histogram_int64Histogram_Call {
_c.Call.Return(run)
return _c
}
// NewMockInt64Histogram creates a new instance of MockInt64Histogram. 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 NewMockInt64Histogram(t interface {
mock.TestingT
Cleanup(func())
}) *MockInt64Histogram {
mock := &MockInt64Histogram{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}