code.vegaprotocol.io/vega@v0.79.0/core/execution/amm/mocks/mocks.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: code.vegaprotocol.io/vega/core/execution/amm (interfaces: Collateral,Position) 3 4 // Package mocks is a generated GoMock package. 5 package mocks 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 events "code.vegaprotocol.io/vega/core/events" 12 types "code.vegaprotocol.io/vega/core/types" 13 num "code.vegaprotocol.io/vega/libs/num" 14 vega "code.vegaprotocol.io/vega/protos/vega" 15 gomock "github.com/golang/mock/gomock" 16 decimal "github.com/shopspring/decimal" 17 ) 18 19 // MockCollateral is a mock of Collateral interface. 20 type MockCollateral struct { 21 ctrl *gomock.Controller 22 recorder *MockCollateralMockRecorder 23 } 24 25 // MockCollateralMockRecorder is the mock recorder for MockCollateral. 26 type MockCollateralMockRecorder struct { 27 mock *MockCollateral 28 } 29 30 // NewMockCollateral creates a new mock instance. 31 func NewMockCollateral(ctrl *gomock.Controller) *MockCollateral { 32 mock := &MockCollateral{ctrl: ctrl} 33 mock.recorder = &MockCollateralMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockCollateral) EXPECT() *MockCollateralMockRecorder { 39 return m.recorder 40 } 41 42 // CreatePartyAMMsSubAccounts mocks base method. 43 func (m *MockCollateral) CreatePartyAMMsSubAccounts(arg0 context.Context, arg1, arg2, arg3, arg4 string) (*types.Account, *types.Account, error) { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "CreatePartyAMMsSubAccounts", arg0, arg1, arg2, arg3, arg4) 46 ret0, _ := ret[0].(*types.Account) 47 ret1, _ := ret[1].(*types.Account) 48 ret2, _ := ret[2].(error) 49 return ret0, ret1, ret2 50 } 51 52 // CreatePartyAMMsSubAccounts indicates an expected call of CreatePartyAMMsSubAccounts. 53 func (mr *MockCollateralMockRecorder) CreatePartyAMMsSubAccounts(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { 54 mr.mock.ctrl.T.Helper() 55 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePartyAMMsSubAccounts", reflect.TypeOf((*MockCollateral)(nil).CreatePartyAMMsSubAccounts), arg0, arg1, arg2, arg3, arg4) 56 } 57 58 // GetAllParties mocks base method. 59 func (m *MockCollateral) GetAllParties() []string { 60 m.ctrl.T.Helper() 61 ret := m.ctrl.Call(m, "GetAllParties") 62 ret0, _ := ret[0].([]string) 63 return ret0 64 } 65 66 // GetAllParties indicates an expected call of GetAllParties. 67 func (mr *MockCollateralMockRecorder) GetAllParties() *gomock.Call { 68 mr.mock.ctrl.T.Helper() 69 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllParties", reflect.TypeOf((*MockCollateral)(nil).GetAllParties)) 70 } 71 72 // GetAssetQuantum mocks base method. 73 func (m *MockCollateral) GetAssetQuantum(arg0 string) (decimal.Decimal, error) { 74 m.ctrl.T.Helper() 75 ret := m.ctrl.Call(m, "GetAssetQuantum", arg0) 76 ret0, _ := ret[0].(decimal.Decimal) 77 ret1, _ := ret[1].(error) 78 return ret0, ret1 79 } 80 81 // GetAssetQuantum indicates an expected call of GetAssetQuantum. 82 func (mr *MockCollateralMockRecorder) GetAssetQuantum(arg0 interface{}) *gomock.Call { 83 mr.mock.ctrl.T.Helper() 84 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAssetQuantum", reflect.TypeOf((*MockCollateral)(nil).GetAssetQuantum), arg0) 85 } 86 87 // GetPartyGeneralAccount mocks base method. 88 func (m *MockCollateral) GetPartyGeneralAccount(arg0, arg1 string) (*types.Account, error) { 89 m.ctrl.T.Helper() 90 ret := m.ctrl.Call(m, "GetPartyGeneralAccount", arg0, arg1) 91 ret0, _ := ret[0].(*types.Account) 92 ret1, _ := ret[1].(error) 93 return ret0, ret1 94 } 95 96 // GetPartyGeneralAccount indicates an expected call of GetPartyGeneralAccount. 97 func (mr *MockCollateralMockRecorder) GetPartyGeneralAccount(arg0, arg1 interface{}) *gomock.Call { 98 mr.mock.ctrl.T.Helper() 99 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPartyGeneralAccount", reflect.TypeOf((*MockCollateral)(nil).GetPartyGeneralAccount), arg0, arg1) 100 } 101 102 // GetPartyMarginAccount mocks base method. 103 func (m *MockCollateral) GetPartyMarginAccount(arg0, arg1, arg2 string) (*types.Account, error) { 104 m.ctrl.T.Helper() 105 ret := m.ctrl.Call(m, "GetPartyMarginAccount", arg0, arg1, arg2) 106 ret0, _ := ret[0].(*types.Account) 107 ret1, _ := ret[1].(error) 108 return ret0, ret1 109 } 110 111 // GetPartyMarginAccount indicates an expected call of GetPartyMarginAccount. 112 func (mr *MockCollateralMockRecorder) GetPartyMarginAccount(arg0, arg1, arg2 interface{}) *gomock.Call { 113 mr.mock.ctrl.T.Helper() 114 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPartyMarginAccount", reflect.TypeOf((*MockCollateral)(nil).GetPartyMarginAccount), arg0, arg1, arg2) 115 } 116 117 // SubAccountClosed mocks base method. 118 func (m *MockCollateral) SubAccountClosed(arg0 context.Context, arg1, arg2, arg3, arg4 string) ([]*types.LedgerMovement, error) { 119 m.ctrl.T.Helper() 120 ret := m.ctrl.Call(m, "SubAccountClosed", arg0, arg1, arg2, arg3, arg4) 121 ret0, _ := ret[0].([]*types.LedgerMovement) 122 ret1, _ := ret[1].(error) 123 return ret0, ret1 124 } 125 126 // SubAccountClosed indicates an expected call of SubAccountClosed. 127 func (mr *MockCollateralMockRecorder) SubAccountClosed(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { 128 mr.mock.ctrl.T.Helper() 129 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubAccountClosed", reflect.TypeOf((*MockCollateral)(nil).SubAccountClosed), arg0, arg1, arg2, arg3, arg4) 130 } 131 132 // SubAccountRelease mocks base method. 133 func (m *MockCollateral) SubAccountRelease(arg0 context.Context, arg1, arg2, arg3, arg4 string, arg5 events.MarketPosition) ([]*types.LedgerMovement, events.Margin, error) { 134 m.ctrl.T.Helper() 135 ret := m.ctrl.Call(m, "SubAccountRelease", arg0, arg1, arg2, arg3, arg4, arg5) 136 ret0, _ := ret[0].([]*types.LedgerMovement) 137 ret1, _ := ret[1].(events.Margin) 138 ret2, _ := ret[2].(error) 139 return ret0, ret1, ret2 140 } 141 142 // SubAccountRelease indicates an expected call of SubAccountRelease. 143 func (mr *MockCollateralMockRecorder) SubAccountRelease(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { 144 mr.mock.ctrl.T.Helper() 145 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubAccountRelease", reflect.TypeOf((*MockCollateral)(nil).SubAccountRelease), arg0, arg1, arg2, arg3, arg4, arg5) 146 } 147 148 // SubAccountUpdate mocks base method. 149 func (m *MockCollateral) SubAccountUpdate(arg0 context.Context, arg1, arg2, arg3, arg4 string, arg5 vega.TransferType, arg6 *num.Uint) (*types.LedgerMovement, error) { 150 m.ctrl.T.Helper() 151 ret := m.ctrl.Call(m, "SubAccountUpdate", arg0, arg1, arg2, arg3, arg4, arg5, arg6) 152 ret0, _ := ret[0].(*types.LedgerMovement) 153 ret1, _ := ret[1].(error) 154 return ret0, ret1 155 } 156 157 // SubAccountUpdate indicates an expected call of SubAccountUpdate. 158 func (mr *MockCollateralMockRecorder) SubAccountUpdate(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { 159 mr.mock.ctrl.T.Helper() 160 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubAccountUpdate", reflect.TypeOf((*MockCollateral)(nil).SubAccountUpdate), arg0, arg1, arg2, arg3, arg4, arg5, arg6) 161 } 162 163 // MockPosition is a mock of Position interface. 164 type MockPosition struct { 165 ctrl *gomock.Controller 166 recorder *MockPositionMockRecorder 167 } 168 169 // MockPositionMockRecorder is the mock recorder for MockPosition. 170 type MockPositionMockRecorder struct { 171 mock *MockPosition 172 } 173 174 // NewMockPosition creates a new mock instance. 175 func NewMockPosition(ctrl *gomock.Controller) *MockPosition { 176 mock := &MockPosition{ctrl: ctrl} 177 mock.recorder = &MockPositionMockRecorder{mock} 178 return mock 179 } 180 181 // EXPECT returns an object that allows the caller to indicate expected use. 182 func (m *MockPosition) EXPECT() *MockPositionMockRecorder { 183 return m.recorder 184 } 185 186 // GetPositionsByParty mocks base method. 187 func (m *MockPosition) GetPositionsByParty(arg0 ...string) []events.MarketPosition { 188 m.ctrl.T.Helper() 189 varargs := []interface{}{} 190 for _, a := range arg0 { 191 varargs = append(varargs, a) 192 } 193 ret := m.ctrl.Call(m, "GetPositionsByParty", varargs...) 194 ret0, _ := ret[0].([]events.MarketPosition) 195 return ret0 196 } 197 198 // GetPositionsByParty indicates an expected call of GetPositionsByParty. 199 func (mr *MockPositionMockRecorder) GetPositionsByParty(arg0 ...interface{}) *gomock.Call { 200 mr.mock.ctrl.T.Helper() 201 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPositionsByParty", reflect.TypeOf((*MockPosition)(nil).GetPositionsByParty), arg0...) 202 }