0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-20 15:08:37 +03:00

Fix testing

This commit is contained in:
JimhHan
2021-04-09 23:36:48 +08:00
parent 726a722019
commit 70b63e21a5
6 changed files with 89 additions and 68 deletions

View File

@ -5,41 +5,42 @@
package mocks
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
log "github.com/xtls/xray-core/common/log"
reflect "reflect"
)
// LogHandler is a mock of Handler interface
// LogHandler is a mock of Handler interface.
type LogHandler struct {
ctrl *gomock.Controller
recorder *LogHandlerMockRecorder
}
// LogHandlerMockRecorder is the mock recorder for LogHandler
// LogHandlerMockRecorder is the mock recorder for LogHandler.
type LogHandlerMockRecorder struct {
mock *LogHandler
}
// NewLogHandler creates a new mock instance
// NewLogHandler creates a new mock instance.
func NewLogHandler(ctrl *gomock.Controller) *LogHandler {
mock := &LogHandler{ctrl: ctrl}
mock.recorder = &LogHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *LogHandler) EXPECT() *LogHandlerMockRecorder {
return m.recorder
}
// Handle mocks base method
// Handle mocks base method.
func (m *LogHandler) Handle(arg0 log.Message) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Handle", arg0)
}
// Handle indicates an expected call of Handle
// Handle indicates an expected call of Handle.
func (mr *LogHandlerMockRecorder) Handle(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*LogHandler)(nil).Handle), arg0)