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

@ -6,38 +6,39 @@ package mocks
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
net "github.com/xtls/xray-core/common/net"
routing "github.com/xtls/xray-core/features/routing"
transport "github.com/xtls/xray-core/transport"
internet "github.com/xtls/xray-core/transport/internet"
reflect "reflect"
)
// ProxyInbound is a mock of Inbound interface
// ProxyInbound is a mock of Inbound interface.
type ProxyInbound struct {
ctrl *gomock.Controller
recorder *ProxyInboundMockRecorder
}
// ProxyInboundMockRecorder is the mock recorder for ProxyInbound
// ProxyInboundMockRecorder is the mock recorder for ProxyInbound.
type ProxyInboundMockRecorder struct {
mock *ProxyInbound
}
// NewProxyInbound creates a new mock instance
// NewProxyInbound creates a new mock instance.
func NewProxyInbound(ctrl *gomock.Controller) *ProxyInbound {
mock := &ProxyInbound{ctrl: ctrl}
mock.recorder = &ProxyInboundMockRecorder{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 *ProxyInbound) EXPECT() *ProxyInboundMockRecorder {
return m.recorder
}
// Network mocks base method
// Network mocks base method.
func (m *ProxyInbound) Network() []net.Network {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Network")
@ -45,13 +46,13 @@ func (m *ProxyInbound) Network() []net.Network {
return ret0
}
// Network indicates an expected call of Network
// Network indicates an expected call of Network.
func (mr *ProxyInboundMockRecorder) Network() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*ProxyInbound)(nil).Network))
}
// Process mocks base method
// Process mocks base method.
func (m *ProxyInbound) Process(arg0 context.Context, arg1 net.Network, arg2 internet.Connection, arg3 routing.Dispatcher) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Process", arg0, arg1, arg2, arg3)
@ -59,36 +60,36 @@ func (m *ProxyInbound) Process(arg0 context.Context, arg1 net.Network, arg2 inte
return ret0
}
// Process indicates an expected call of Process
// Process indicates an expected call of Process.
func (mr *ProxyInboundMockRecorder) Process(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Process", reflect.TypeOf((*ProxyInbound)(nil).Process), arg0, arg1, arg2, arg3)
}
// ProxyOutbound is a mock of Outbound interface
// ProxyOutbound is a mock of Outbound interface.
type ProxyOutbound struct {
ctrl *gomock.Controller
recorder *ProxyOutboundMockRecorder
}
// ProxyOutboundMockRecorder is the mock recorder for ProxyOutbound
// ProxyOutboundMockRecorder is the mock recorder for ProxyOutbound.
type ProxyOutboundMockRecorder struct {
mock *ProxyOutbound
}
// NewProxyOutbound creates a new mock instance
// NewProxyOutbound creates a new mock instance.
func NewProxyOutbound(ctrl *gomock.Controller) *ProxyOutbound {
mock := &ProxyOutbound{ctrl: ctrl}
mock.recorder = &ProxyOutboundMockRecorder{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 *ProxyOutbound) EXPECT() *ProxyOutboundMockRecorder {
return m.recorder
}
// Process mocks base method
// Process mocks base method.
func (m *ProxyOutbound) Process(arg0 context.Context, arg1 *transport.Link, arg2 internet.Dialer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Process", arg0, arg1, arg2)
@ -96,7 +97,7 @@ func (m *ProxyOutbound) Process(arg0 context.Context, arg1 *transport.Link, arg2
return ret0
}
// Process indicates an expected call of Process
// Process indicates an expected call of Process.
func (mr *ProxyOutboundMockRecorder) Process(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Process", reflect.TypeOf((*ProxyOutbound)(nil).Process), arg0, arg1, arg2)