go.uber.org/yarpc@v1.72.1/api/transport/transporttest/router.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: go.uber.org/yarpc/api/transport (interfaces: Router,RouteTable) 3 4 // Copyright (c) 2022 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package transporttest is a generated GoMock package. 25 package transporttest 26 27 import ( 28 context "context" 29 gomock "github.com/golang/mock/gomock" 30 transport "go.uber.org/yarpc/api/transport" 31 reflect "reflect" 32 ) 33 34 // MockRouter is a mock of Router interface 35 type MockRouter struct { 36 ctrl *gomock.Controller 37 recorder *MockRouterMockRecorder 38 } 39 40 // MockRouterMockRecorder is the mock recorder for MockRouter 41 type MockRouterMockRecorder struct { 42 mock *MockRouter 43 } 44 45 // NewMockRouter creates a new mock instance 46 func NewMockRouter(ctrl *gomock.Controller) *MockRouter { 47 mock := &MockRouter{ctrl: ctrl} 48 mock.recorder = &MockRouterMockRecorder{mock} 49 return mock 50 } 51 52 // EXPECT returns an object that allows the caller to indicate expected use 53 func (m *MockRouter) EXPECT() *MockRouterMockRecorder { 54 return m.recorder 55 } 56 57 // Choose mocks base method 58 func (m *MockRouter) Choose(arg0 context.Context, arg1 *transport.Request) (transport.HandlerSpec, error) { 59 m.ctrl.T.Helper() 60 ret := m.ctrl.Call(m, "Choose", arg0, arg1) 61 ret0, _ := ret[0].(transport.HandlerSpec) 62 ret1, _ := ret[1].(error) 63 return ret0, ret1 64 } 65 66 // Choose indicates an expected call of Choose 67 func (mr *MockRouterMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call { 68 mr.mock.ctrl.T.Helper() 69 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Choose", reflect.TypeOf((*MockRouter)(nil).Choose), arg0, arg1) 70 } 71 72 // Procedures mocks base method 73 func (m *MockRouter) Procedures() []transport.Procedure { 74 m.ctrl.T.Helper() 75 ret := m.ctrl.Call(m, "Procedures") 76 ret0, _ := ret[0].([]transport.Procedure) 77 return ret0 78 } 79 80 // Procedures indicates an expected call of Procedures 81 func (mr *MockRouterMockRecorder) Procedures() *gomock.Call { 82 mr.mock.ctrl.T.Helper() 83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Procedures", reflect.TypeOf((*MockRouter)(nil).Procedures)) 84 } 85 86 // MockRouteTable is a mock of RouteTable interface 87 type MockRouteTable struct { 88 ctrl *gomock.Controller 89 recorder *MockRouteTableMockRecorder 90 } 91 92 // MockRouteTableMockRecorder is the mock recorder for MockRouteTable 93 type MockRouteTableMockRecorder struct { 94 mock *MockRouteTable 95 } 96 97 // NewMockRouteTable creates a new mock instance 98 func NewMockRouteTable(ctrl *gomock.Controller) *MockRouteTable { 99 mock := &MockRouteTable{ctrl: ctrl} 100 mock.recorder = &MockRouteTableMockRecorder{mock} 101 return mock 102 } 103 104 // EXPECT returns an object that allows the caller to indicate expected use 105 func (m *MockRouteTable) EXPECT() *MockRouteTableMockRecorder { 106 return m.recorder 107 } 108 109 // Choose mocks base method 110 func (m *MockRouteTable) Choose(arg0 context.Context, arg1 *transport.Request) (transport.HandlerSpec, error) { 111 m.ctrl.T.Helper() 112 ret := m.ctrl.Call(m, "Choose", arg0, arg1) 113 ret0, _ := ret[0].(transport.HandlerSpec) 114 ret1, _ := ret[1].(error) 115 return ret0, ret1 116 } 117 118 // Choose indicates an expected call of Choose 119 func (mr *MockRouteTableMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call { 120 mr.mock.ctrl.T.Helper() 121 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Choose", reflect.TypeOf((*MockRouteTable)(nil).Choose), arg0, arg1) 122 } 123 124 // Procedures mocks base method 125 func (m *MockRouteTable) Procedures() []transport.Procedure { 126 m.ctrl.T.Helper() 127 ret := m.ctrl.Call(m, "Procedures") 128 ret0, _ := ret[0].([]transport.Procedure) 129 return ret0 130 } 131 132 // Procedures indicates an expected call of Procedures 133 func (mr *MockRouteTableMockRecorder) Procedures() *gomock.Call { 134 mr.mock.ctrl.T.Helper() 135 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Procedures", reflect.TypeOf((*MockRouteTable)(nil).Procedures)) 136 } 137 138 // Register mocks base method 139 func (m *MockRouteTable) Register(arg0 []transport.Procedure) { 140 m.ctrl.T.Helper() 141 m.ctrl.Call(m, "Register", arg0) 142 } 143 144 // Register indicates an expected call of Register 145 func (mr *MockRouteTableMockRecorder) Register(arg0 interface{}) *gomock.Call { 146 mr.mock.ctrl.T.Helper() 147 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRouteTable)(nil).Register), arg0) 148 }