-
Notifications
You must be signed in to change notification settings - Fork 19
/
mocks.go
180 lines (151 loc) · 5.71 KB
/
mocks.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Code generated by MockGen. DO NOT EDIT.
// Source: code.vegaprotocol.io/vega/core/execution/liquidation (interfaces: Book,IDGen,Positions,PriceMonitor)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
events "code.vegaprotocol.io/vega/core/events"
positions "code.vegaprotocol.io/vega/core/positions"
types "code.vegaprotocol.io/vega/core/types"
num "code.vegaprotocol.io/vega/libs/num"
vega "code.vegaprotocol.io/vega/protos/vega"
gomock "github.com/golang/mock/gomock"
)
// MockBook is a mock of Book interface.
type MockBook struct {
ctrl *gomock.Controller
recorder *MockBookMockRecorder
}
// MockBookMockRecorder is the mock recorder for MockBook.
type MockBookMockRecorder struct {
mock *MockBook
}
// NewMockBook creates a new mock instance.
func NewMockBook(ctrl *gomock.Controller) *MockBook {
mock := &MockBook{ctrl: ctrl}
mock.recorder = &MockBookMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBook) EXPECT() *MockBookMockRecorder {
return m.recorder
}
// GetVolumeAtPrice mocks base method.
func (m *MockBook) GetVolumeAtPrice(arg0 *num.Uint, arg1 vega.Side) uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetVolumeAtPrice", arg0, arg1)
ret0, _ := ret[0].(uint64)
return ret0
}
// GetVolumeAtPrice indicates an expected call of GetVolumeAtPrice.
func (mr *MockBookMockRecorder) GetVolumeAtPrice(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeAtPrice", reflect.TypeOf((*MockBook)(nil).GetVolumeAtPrice), arg0, arg1)
}
// MockIDGen is a mock of IDGen interface.
type MockIDGen struct {
ctrl *gomock.Controller
recorder *MockIDGenMockRecorder
}
// MockIDGenMockRecorder is the mock recorder for MockIDGen.
type MockIDGenMockRecorder struct {
mock *MockIDGen
}
// NewMockIDGen creates a new mock instance.
func NewMockIDGen(ctrl *gomock.Controller) *MockIDGen {
mock := &MockIDGen{ctrl: ctrl}
mock.recorder = &MockIDGenMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIDGen) EXPECT() *MockIDGenMockRecorder {
return m.recorder
}
// NextID mocks base method.
func (m *MockIDGen) NextID() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextID")
ret0, _ := ret[0].(string)
return ret0
}
// NextID indicates an expected call of NextID.
func (mr *MockIDGenMockRecorder) NextID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextID", reflect.TypeOf((*MockIDGen)(nil).NextID))
}
// MockPositions is a mock of Positions interface.
type MockPositions struct {
ctrl *gomock.Controller
recorder *MockPositionsMockRecorder
}
// MockPositionsMockRecorder is the mock recorder for MockPositions.
type MockPositionsMockRecorder struct {
mock *MockPositions
}
// NewMockPositions creates a new mock instance.
func NewMockPositions(ctrl *gomock.Controller) *MockPositions {
mock := &MockPositions{ctrl: ctrl}
mock.recorder = &MockPositionsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPositions) EXPECT() *MockPositionsMockRecorder {
return m.recorder
}
// RegisterOrder mocks base method.
func (m *MockPositions) RegisterOrder(arg0 context.Context, arg1 *types.Order) *positions.MarketPosition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterOrder", arg0, arg1)
ret0, _ := ret[0].(*positions.MarketPosition)
return ret0
}
// RegisterOrder indicates an expected call of RegisterOrder.
func (mr *MockPositionsMockRecorder) RegisterOrder(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterOrder", reflect.TypeOf((*MockPositions)(nil).RegisterOrder), arg0, arg1)
}
// Update mocks base method.
func (m *MockPositions) Update(arg0 context.Context, arg1 *types.Trade, arg2, arg3 *types.Order) []events.MarketPosition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]events.MarketPosition)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockPositionsMockRecorder) Update(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPositions)(nil).Update), arg0, arg1, arg2, arg3)
}
// MockPriceMonitor is a mock of PriceMonitor interface.
type MockPriceMonitor struct {
ctrl *gomock.Controller
recorder *MockPriceMonitorMockRecorder
}
// MockPriceMonitorMockRecorder is the mock recorder for MockPriceMonitor.
type MockPriceMonitorMockRecorder struct {
mock *MockPriceMonitor
}
// NewMockPriceMonitor creates a new mock instance.
func NewMockPriceMonitor(ctrl *gomock.Controller) *MockPriceMonitor {
mock := &MockPriceMonitor{ctrl: ctrl}
mock.recorder = &MockPriceMonitorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPriceMonitor) EXPECT() *MockPriceMonitorMockRecorder {
return m.recorder
}
// GetValidPriceRange mocks base method.
func (m *MockPriceMonitor) GetValidPriceRange() (num.WrappedDecimal, num.WrappedDecimal) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetValidPriceRange")
ret0, _ := ret[0].(num.WrappedDecimal)
ret1, _ := ret[1].(num.WrappedDecimal)
return ret0, ret1
}
// GetValidPriceRange indicates an expected call of GetValidPriceRange.
func (mr *MockPriceMonitorMockRecorder) GetValidPriceRange() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidPriceRange", reflect.TypeOf((*MockPriceMonitor)(nil).GetValidPriceRange))
}