-
Notifications
You must be signed in to change notification settings - Fork 1
/
mock_test.go
127 lines (107 loc) · 4.04 KB
/
mock_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
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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/c0va23/go-proxyprotocol (interfaces: Logger,HeaderParser,HeaderParserBuilder)
// Package proxyprotocol_test is a generated GoMock package.
package proxyprotocol_test
import (
bufio "bufio"
go_proxyprotocol "github.com/c0va23/go-proxyprotocol"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockLogger is a mock of Logger interface
type MockLogger struct {
ctrl *gomock.Controller
recorder *MockLoggerMockRecorder
}
// MockLoggerMockRecorder is the mock recorder for MockLogger
type MockLoggerMockRecorder struct {
mock *MockLogger
}
// NewMockLogger creates a new mock instance
func NewMockLogger(ctrl *gomock.Controller) *MockLogger {
mock := &MockLogger{ctrl: ctrl}
mock.recorder = &MockLoggerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockLogger) EXPECT() *MockLoggerMockRecorder {
return m.recorder
}
// Printf mocks base method
func (m *MockLogger) Printf(arg0 string, arg1 ...interface{}) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Printf", varargs...)
}
// Printf indicates an expected call of Printf
func (mr *MockLoggerMockRecorder) Printf(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Printf", reflect.TypeOf((*MockLogger)(nil).Printf), varargs...)
}
// MockHeaderParser is a mock of HeaderParser interface
type MockHeaderParser struct {
ctrl *gomock.Controller
recorder *MockHeaderParserMockRecorder
}
// MockHeaderParserMockRecorder is the mock recorder for MockHeaderParser
type MockHeaderParserMockRecorder struct {
mock *MockHeaderParser
}
// NewMockHeaderParser creates a new mock instance
func NewMockHeaderParser(ctrl *gomock.Controller) *MockHeaderParser {
mock := &MockHeaderParser{ctrl: ctrl}
mock.recorder = &MockHeaderParserMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockHeaderParser) EXPECT() *MockHeaderParserMockRecorder {
return m.recorder
}
// Parse mocks base method
func (m *MockHeaderParser) Parse(arg0 *bufio.Reader) (*go_proxyprotocol.Header, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Parse", arg0)
ret0, _ := ret[0].(*go_proxyprotocol.Header)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Parse indicates an expected call of Parse
func (mr *MockHeaderParserMockRecorder) Parse(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parse", reflect.TypeOf((*MockHeaderParser)(nil).Parse), arg0)
}
// MockHeaderParserBuilder is a mock of HeaderParserBuilder interface
type MockHeaderParserBuilder struct {
ctrl *gomock.Controller
recorder *MockHeaderParserBuilderMockRecorder
}
// MockHeaderParserBuilderMockRecorder is the mock recorder for MockHeaderParserBuilder
type MockHeaderParserBuilderMockRecorder struct {
mock *MockHeaderParserBuilder
}
// NewMockHeaderParserBuilder creates a new mock instance
func NewMockHeaderParserBuilder(ctrl *gomock.Controller) *MockHeaderParserBuilder {
mock := &MockHeaderParserBuilder{ctrl: ctrl}
mock.recorder = &MockHeaderParserBuilderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockHeaderParserBuilder) EXPECT() *MockHeaderParserBuilderMockRecorder {
return m.recorder
}
// Build mocks base method
func (m *MockHeaderParserBuilder) Build(arg0 go_proxyprotocol.Logger) go_proxyprotocol.HeaderParser {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Build", arg0)
ret0, _ := ret[0].(go_proxyprotocol.HeaderParser)
return ret0
}
// Build indicates an expected call of Build
func (mr *MockHeaderParserBuilderMockRecorder) Build(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockHeaderParserBuilder)(nil).Build), arg0)
}