-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmock.go
37 lines (27 loc) · 846 Bytes
/
mock.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
package slog
import (
"context"
"github.com/stretchr/testify/mock"
)
type MockLogger struct {
mock.Mock
}
var _ LeveledLogger = &MockLogger{}
func (m *MockLogger) Critical(ctx context.Context, msg string, params ...interface{}) {
m.Called(ctx, msg, params)
}
func (m *MockLogger) Error(ctx context.Context, msg string, params ...interface{}) {
m.Called(ctx, msg, params)
}
func (m *MockLogger) Warn(ctx context.Context, msg string, params ...interface{}) {
m.Called(ctx, msg, params)
}
func (m *MockLogger) Info(ctx context.Context, msg string, params ...interface{}) {
m.Called(ctx, msg, params)
}
func (m *MockLogger) Debug(ctx context.Context, msg string, params ...interface{}) {
m.Called(ctx, msg, params)
}
func (m *MockLogger) Trace(ctx context.Context, msg string, params ...interface{}) {
m.Called(ctx, msg, params)
}