-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock.handler_test.go
98 lines (83 loc) · 2.89 KB
/
mock.handler_test.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
// Code generated by MockGen. DO NOT EDIT.
// Source: log/slog (interfaces: Handler)
//
// Generated by this command:
//
// mockgen -destination=mock.handler_test.go -package=slogx_test log/slog Handler
//
// Package slogx_test is a generated GoMock package.
package slogx_test
import (
context "context"
slog "log/slog"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockHandler is a mock of Handler interface.
type MockHandler struct {
ctrl *gomock.Controller
recorder *MockHandlerMockRecorder
isgomock struct{}
}
// MockHandlerMockRecorder is the mock recorder for MockHandler.
type MockHandlerMockRecorder struct {
mock *MockHandler
}
// NewMockHandler creates a new mock instance.
func NewMockHandler(ctrl *gomock.Controller) *MockHandler {
mock := &MockHandler{ctrl: ctrl}
mock.recorder = &MockHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHandler) EXPECT() *MockHandlerMockRecorder {
return m.recorder
}
// Enabled mocks base method.
func (m *MockHandler) Enabled(arg0 context.Context, arg1 slog.Level) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Enabled", arg0, arg1)
ret0, _ := ret[0].(bool)
return ret0
}
// Enabled indicates an expected call of Enabled.
func (mr *MockHandlerMockRecorder) Enabled(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*MockHandler)(nil).Enabled), arg0, arg1)
}
// Handle mocks base method.
func (m *MockHandler) Handle(arg0 context.Context, arg1 slog.Record) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Handle", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Handle indicates an expected call of Handle.
func (mr *MockHandlerMockRecorder) Handle(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockHandler)(nil).Handle), arg0, arg1)
}
// WithAttrs mocks base method.
func (m *MockHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WithAttrs", attrs)
ret0, _ := ret[0].(slog.Handler)
return ret0
}
// WithAttrs indicates an expected call of WithAttrs.
func (mr *MockHandlerMockRecorder) WithAttrs(attrs any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithAttrs", reflect.TypeOf((*MockHandler)(nil).WithAttrs), attrs)
}
// WithGroup mocks base method.
func (m *MockHandler) WithGroup(name string) slog.Handler {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WithGroup", name)
ret0, _ := ret[0].(slog.Handler)
return ret0
}
// WithGroup indicates an expected call of WithGroup.
func (mr *MockHandlerMockRecorder) WithGroup(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithGroup", reflect.TypeOf((*MockHandler)(nil).WithGroup), name)
}