Files
fx-serverless/context/mocks/context.go
Minghe c0009b1b64 request a port when not port given (#379)
* request a port when not port given
* make context an interface, for easy testing (#380)
2019-12-03 15:14:13 +08:00

105 lines
3.1 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: context.go
// Package mock_context is a generated GoMock package.
package mock_context
import (
context "context"
gomock "github.com/golang/mock/gomock"
context0 "github.com/metrue/fx/context"
cli "github.com/urfave/cli"
reflect "reflect"
)
// MockContexter is a mock of Contexter interface
type MockContexter struct {
ctrl *gomock.Controller
recorder *MockContexterMockRecorder
}
// MockContexterMockRecorder is the mock recorder for MockContexter
type MockContexterMockRecorder struct {
mock *MockContexter
}
// NewMockContexter creates a new mock instance
func NewMockContexter(ctrl *gomock.Controller) *MockContexter {
mock := &MockContexter{ctrl: ctrl}
mock.recorder = &MockContexterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockContexter) EXPECT() *MockContexterMockRecorder {
return m.recorder
}
// Get mocks base method
func (m *MockContexter) Get(k string) interface{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", k)
ret0, _ := ret[0].(interface{})
return ret0
}
// Get indicates an expected call of Get
func (mr *MockContexterMockRecorder) Get(k interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockContexter)(nil).Get), k)
}
// Set mocks base method
func (m *MockContexter) Set(k string, v interface{}) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Set", k, v)
}
// Set indicates an expected call of Set
func (mr *MockContexterMockRecorder) Set(k, v interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockContexter)(nil).Set), k, v)
}
// Use mocks base method
func (m *MockContexter) Use(fn func(*context0.Context) error) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Use", fn)
ret0, _ := ret[0].(error)
return ret0
}
// Use indicates an expected call of Use
func (mr *MockContexterMockRecorder) Use(fn interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Use", reflect.TypeOf((*MockContexter)(nil).Use), fn)
}
// GetContext mocks base method
func (m *MockContexter) GetContext() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetContext")
ret0, _ := ret[0].(context.Context)
return ret0
}
// GetContext indicates an expected call of GetContext
func (mr *MockContexterMockRecorder) GetContext() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContext", reflect.TypeOf((*MockContexter)(nil).GetContext))
}
// GetCliContext mocks base method
func (m *MockContexter) GetCliContext() *cli.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCliContext")
ret0, _ := ret[0].(*cli.Context)
return ret0
}
// GetCliContext indicates an expected call of GetCliContext
func (mr *MockContexterMockRecorder) GetCliContext() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCliContext", reflect.TypeOf((*MockContexter)(nil).GetCliContext))
}