forked from quic-go/quic-go
use a GoMock ClientSessionCache in the handshake tests
This commit is contained in:
61
internal/handshake/mock_client_session_cache_test.go
Normal file
61
internal/handshake/mock_client_session_cache_test.go
Normal file
@@ -0,0 +1,61 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: crypto/tls (interfaces: ClientSessionCache)
|
||||
|
||||
// Package handshake is a generated GoMock package.
|
||||
package handshake
|
||||
|
||||
import (
|
||||
tls "crypto/tls"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockClientSessionCache is a mock of ClientSessionCache interface
|
||||
type MockClientSessionCache struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockClientSessionCacheMockRecorder
|
||||
}
|
||||
|
||||
// MockClientSessionCacheMockRecorder is the mock recorder for MockClientSessionCache
|
||||
type MockClientSessionCacheMockRecorder struct {
|
||||
mock *MockClientSessionCache
|
||||
}
|
||||
|
||||
// NewMockClientSessionCache creates a new mock instance
|
||||
func NewMockClientSessionCache(ctrl *gomock.Controller) *MockClientSessionCache {
|
||||
mock := &MockClientSessionCache{ctrl: ctrl}
|
||||
mock.recorder = &MockClientSessionCacheMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
func (m *MockClientSessionCache) EXPECT() *MockClientSessionCacheMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// Get mocks base method
|
||||
func (m *MockClientSessionCache) Get(arg0 string) (*tls.ClientSessionState, bool) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Get", arg0)
|
||||
ret0, _ := ret[0].(*tls.ClientSessionState)
|
||||
ret1, _ := ret[1].(bool)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Get indicates an expected call of Get
|
||||
func (mr *MockClientSessionCacheMockRecorder) Get(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClientSessionCache)(nil).Get), arg0)
|
||||
}
|
||||
|
||||
// Put mocks base method
|
||||
func (m *MockClientSessionCache) Put(arg0 string, arg1 *tls.ClientSessionState) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "Put", arg0, arg1)
|
||||
}
|
||||
|
||||
// Put indicates an expected call of Put
|
||||
func (mr *MockClientSessionCacheMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockClientSessionCache)(nil).Put), arg0, arg1)
|
||||
}
|
||||
Reference in New Issue
Block a user