code.vegaprotocol.io/vega@v0.79.0/core/risk/mocks/mocks.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: code.vegaprotocol.io/vega/core/risk (interfaces: Orderbook,AuctionState,TimeService,StateVarEngine,Model) 3 4 // Package mocks is a generated GoMock package. 5 package mocks 6 7 import ( 8 context "context" 9 reflect "reflect" 10 time "time" 11 12 types "code.vegaprotocol.io/vega/core/types" 13 statevar "code.vegaprotocol.io/vega/core/types/statevar" 14 num "code.vegaprotocol.io/vega/libs/num" 15 gomock "github.com/golang/mock/gomock" 16 decimal "github.com/shopspring/decimal" 17 ) 18 19 // MockOrderbook is a mock of Orderbook interface. 20 type MockOrderbook struct { 21 ctrl *gomock.Controller 22 recorder *MockOrderbookMockRecorder 23 } 24 25 // MockOrderbookMockRecorder is the mock recorder for MockOrderbook. 26 type MockOrderbookMockRecorder struct { 27 mock *MockOrderbook 28 } 29 30 // NewMockOrderbook creates a new mock instance. 31 func NewMockOrderbook(ctrl *gomock.Controller) *MockOrderbook { 32 mock := &MockOrderbook{ctrl: ctrl} 33 mock.recorder = &MockOrderbookMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockOrderbook) EXPECT() *MockOrderbookMockRecorder { 39 return m.recorder 40 } 41 42 // GetIndicativePrice mocks base method. 43 func (m *MockOrderbook) GetIndicativePrice() *num.Uint { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "GetIndicativePrice") 46 ret0, _ := ret[0].(*num.Uint) 47 return ret0 48 } 49 50 // GetIndicativePrice indicates an expected call of GetIndicativePrice. 51 func (mr *MockOrderbookMockRecorder) GetIndicativePrice() *gomock.Call { 52 mr.mock.ctrl.T.Helper() 53 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIndicativePrice", reflect.TypeOf((*MockOrderbook)(nil).GetIndicativePrice)) 54 } 55 56 // MockAuctionState is a mock of AuctionState interface. 57 type MockAuctionState struct { 58 ctrl *gomock.Controller 59 recorder *MockAuctionStateMockRecorder 60 } 61 62 // MockAuctionStateMockRecorder is the mock recorder for MockAuctionState. 63 type MockAuctionStateMockRecorder struct { 64 mock *MockAuctionState 65 } 66 67 // NewMockAuctionState creates a new mock instance. 68 func NewMockAuctionState(ctrl *gomock.Controller) *MockAuctionState { 69 mock := &MockAuctionState{ctrl: ctrl} 70 mock.recorder = &MockAuctionStateMockRecorder{mock} 71 return mock 72 } 73 74 // EXPECT returns an object that allows the caller to indicate expected use. 75 func (m *MockAuctionState) EXPECT() *MockAuctionStateMockRecorder { 76 return m.recorder 77 } 78 79 // CanLeave mocks base method. 80 func (m *MockAuctionState) CanLeave() bool { 81 m.ctrl.T.Helper() 82 ret := m.ctrl.Call(m, "CanLeave") 83 ret0, _ := ret[0].(bool) 84 return ret0 85 } 86 87 // CanLeave indicates an expected call of CanLeave. 88 func (mr *MockAuctionStateMockRecorder) CanLeave() *gomock.Call { 89 mr.mock.ctrl.T.Helper() 90 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanLeave", reflect.TypeOf((*MockAuctionState)(nil).CanLeave)) 91 } 92 93 // InAuction mocks base method. 94 func (m *MockAuctionState) InAuction() bool { 95 m.ctrl.T.Helper() 96 ret := m.ctrl.Call(m, "InAuction") 97 ret0, _ := ret[0].(bool) 98 return ret0 99 } 100 101 // InAuction indicates an expected call of InAuction. 102 func (mr *MockAuctionStateMockRecorder) InAuction() *gomock.Call { 103 mr.mock.ctrl.T.Helper() 104 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InAuction", reflect.TypeOf((*MockAuctionState)(nil).InAuction)) 105 } 106 107 // MockTimeService is a mock of TimeService interface. 108 type MockTimeService struct { 109 ctrl *gomock.Controller 110 recorder *MockTimeServiceMockRecorder 111 } 112 113 // MockTimeServiceMockRecorder is the mock recorder for MockTimeService. 114 type MockTimeServiceMockRecorder struct { 115 mock *MockTimeService 116 } 117 118 // NewMockTimeService creates a new mock instance. 119 func NewMockTimeService(ctrl *gomock.Controller) *MockTimeService { 120 mock := &MockTimeService{ctrl: ctrl} 121 mock.recorder = &MockTimeServiceMockRecorder{mock} 122 return mock 123 } 124 125 // EXPECT returns an object that allows the caller to indicate expected use. 126 func (m *MockTimeService) EXPECT() *MockTimeServiceMockRecorder { 127 return m.recorder 128 } 129 130 // GetTimeNow mocks base method. 131 func (m *MockTimeService) GetTimeNow() time.Time { 132 m.ctrl.T.Helper() 133 ret := m.ctrl.Call(m, "GetTimeNow") 134 ret0, _ := ret[0].(time.Time) 135 return ret0 136 } 137 138 // GetTimeNow indicates an expected call of GetTimeNow. 139 func (mr *MockTimeServiceMockRecorder) GetTimeNow() *gomock.Call { 140 mr.mock.ctrl.T.Helper() 141 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimeNow", reflect.TypeOf((*MockTimeService)(nil).GetTimeNow)) 142 } 143 144 // MockStateVarEngine is a mock of StateVarEngine interface. 145 type MockStateVarEngine struct { 146 ctrl *gomock.Controller 147 recorder *MockStateVarEngineMockRecorder 148 } 149 150 // MockStateVarEngineMockRecorder is the mock recorder for MockStateVarEngine. 151 type MockStateVarEngineMockRecorder struct { 152 mock *MockStateVarEngine 153 } 154 155 // NewMockStateVarEngine creates a new mock instance. 156 func NewMockStateVarEngine(ctrl *gomock.Controller) *MockStateVarEngine { 157 mock := &MockStateVarEngine{ctrl: ctrl} 158 mock.recorder = &MockStateVarEngineMockRecorder{mock} 159 return mock 160 } 161 162 // EXPECT returns an object that allows the caller to indicate expected use. 163 func (m *MockStateVarEngine) EXPECT() *MockStateVarEngineMockRecorder { 164 return m.recorder 165 } 166 167 // NewEvent mocks base method. 168 func (m *MockStateVarEngine) NewEvent(arg0, arg1 string, arg2 statevar.EventType) { 169 m.ctrl.T.Helper() 170 m.ctrl.Call(m, "NewEvent", arg0, arg1, arg2) 171 } 172 173 // NewEvent indicates an expected call of NewEvent. 174 func (mr *MockStateVarEngineMockRecorder) NewEvent(arg0, arg1, arg2 interface{}) *gomock.Call { 175 mr.mock.ctrl.T.Helper() 176 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewEvent", reflect.TypeOf((*MockStateVarEngine)(nil).NewEvent), arg0, arg1, arg2) 177 } 178 179 // RegisterStateVariable mocks base method. 180 func (m *MockStateVarEngine) RegisterStateVariable(arg0, arg1, arg2 string, arg3 statevar.Converter, arg4 func(string, statevar.FinaliseCalculation), arg5 []statevar.EventType, arg6 func(context.Context, statevar.StateVariableResult) error) error { 181 m.ctrl.T.Helper() 182 ret := m.ctrl.Call(m, "RegisterStateVariable", arg0, arg1, arg2, arg3, arg4, arg5, arg6) 183 ret0, _ := ret[0].(error) 184 return ret0 185 } 186 187 // RegisterStateVariable indicates an expected call of RegisterStateVariable. 188 func (mr *MockStateVarEngineMockRecorder) RegisterStateVariable(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { 189 mr.mock.ctrl.T.Helper() 190 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterStateVariable", reflect.TypeOf((*MockStateVarEngine)(nil).RegisterStateVariable), arg0, arg1, arg2, arg3, arg4, arg5, arg6) 191 } 192 193 // MockModel is a mock of Model interface. 194 type MockModel struct { 195 ctrl *gomock.Controller 196 recorder *MockModelMockRecorder 197 } 198 199 // MockModelMockRecorder is the mock recorder for MockModel. 200 type MockModelMockRecorder struct { 201 mock *MockModel 202 } 203 204 // NewMockModel creates a new mock instance. 205 func NewMockModel(ctrl *gomock.Controller) *MockModel { 206 mock := &MockModel{ctrl: ctrl} 207 mock.recorder = &MockModelMockRecorder{mock} 208 return mock 209 } 210 211 // EXPECT returns an object that allows the caller to indicate expected use. 212 func (m *MockModel) EXPECT() *MockModelMockRecorder { 213 return m.recorder 214 } 215 216 // CalculateRiskFactors mocks base method. 217 func (m *MockModel) CalculateRiskFactors() *types.RiskFactor { 218 m.ctrl.T.Helper() 219 ret := m.ctrl.Call(m, "CalculateRiskFactors") 220 ret0, _ := ret[0].(*types.RiskFactor) 221 return ret0 222 } 223 224 // CalculateRiskFactors indicates an expected call of CalculateRiskFactors. 225 func (mr *MockModelMockRecorder) CalculateRiskFactors() *gomock.Call { 226 mr.mock.ctrl.T.Helper() 227 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateRiskFactors", reflect.TypeOf((*MockModel)(nil).CalculateRiskFactors)) 228 } 229 230 // DefaultRiskFactors mocks base method. 231 func (m *MockModel) DefaultRiskFactors() *types.RiskFactor { 232 m.ctrl.T.Helper() 233 ret := m.ctrl.Call(m, "DefaultRiskFactors") 234 ret0, _ := ret[0].(*types.RiskFactor) 235 return ret0 236 } 237 238 // DefaultRiskFactors indicates an expected call of DefaultRiskFactors. 239 func (mr *MockModelMockRecorder) DefaultRiskFactors() *gomock.Call { 240 mr.mock.ctrl.T.Helper() 241 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultRiskFactors", reflect.TypeOf((*MockModel)(nil).DefaultRiskFactors)) 242 } 243 244 // GetProjectionHorizon mocks base method. 245 func (m *MockModel) GetProjectionHorizon() decimal.Decimal { 246 m.ctrl.T.Helper() 247 ret := m.ctrl.Call(m, "GetProjectionHorizon") 248 ret0, _ := ret[0].(decimal.Decimal) 249 return ret0 250 } 251 252 // GetProjectionHorizon indicates an expected call of GetProjectionHorizon. 253 func (mr *MockModelMockRecorder) GetProjectionHorizon() *gomock.Call { 254 mr.mock.ctrl.T.Helper() 255 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjectionHorizon", reflect.TypeOf((*MockModel)(nil).GetProjectionHorizon)) 256 } 257 258 // PriceRange mocks base method. 259 func (m *MockModel) PriceRange(arg0, arg1, arg2 decimal.Decimal) (decimal.Decimal, decimal.Decimal) { 260 m.ctrl.T.Helper() 261 ret := m.ctrl.Call(m, "PriceRange", arg0, arg1, arg2) 262 ret0, _ := ret[0].(decimal.Decimal) 263 ret1, _ := ret[1].(decimal.Decimal) 264 return ret0, ret1 265 } 266 267 // PriceRange indicates an expected call of PriceRange. 268 func (mr *MockModelMockRecorder) PriceRange(arg0, arg1, arg2 interface{}) *gomock.Call { 269 mr.mock.ctrl.T.Helper() 270 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PriceRange", reflect.TypeOf((*MockModel)(nil).PriceRange), arg0, arg1, arg2) 271 } 272 273 // ProbabilityOfTrading mocks base method. 274 func (m *MockModel) ProbabilityOfTrading(arg0, arg1, arg2, arg3, arg4 decimal.Decimal, arg5, arg6 bool) decimal.Decimal { 275 m.ctrl.T.Helper() 276 ret := m.ctrl.Call(m, "ProbabilityOfTrading", arg0, arg1, arg2, arg3, arg4, arg5, arg6) 277 ret0, _ := ret[0].(decimal.Decimal) 278 return ret0 279 } 280 281 // ProbabilityOfTrading indicates an expected call of ProbabilityOfTrading. 282 func (mr *MockModelMockRecorder) ProbabilityOfTrading(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { 283 mr.mock.ctrl.T.Helper() 284 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProbabilityOfTrading", reflect.TypeOf((*MockModel)(nil).ProbabilityOfTrading), arg0, arg1, arg2, arg3, arg4, arg5, arg6) 285 }