-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_q_accounts.go
executable file
·37 lines (29 loc) · 1.05 KB
/
mock_q_accounts.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
package history
import (
"github.com/stretchr/testify/mock"
"github.com/paydex-core/paydex-go/xdr"
)
// MockQAccounts is a mock implementation of the QAccounts interface
type MockQAccounts struct {
mock.Mock
}
func (m *MockQAccounts) GetAccountsByIDs(ids []string) ([]AccountEntry, error) {
a := m.Called()
return a.Get(0).([]AccountEntry), a.Error(1)
}
func (m *MockQAccounts) NewAccountsBatchInsertBuilder(maxBatchSize int) AccountsBatchInsertBuilder {
a := m.Called(maxBatchSize)
return a.Get(0).(AccountsBatchInsertBuilder)
}
func (m *MockQAccounts) InsertAccount(account xdr.AccountEntry, lastModifiedLedger xdr.Uint32) (int64, error) {
a := m.Called(account, lastModifiedLedger)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQAccounts) UpdateAccount(account xdr.AccountEntry, lastModifiedLedger xdr.Uint32) (int64, error) {
a := m.Called(account, lastModifiedLedger)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQAccounts) RemoveAccount(accountID string) (int64, error) {
a := m.Called(accountID)
return a.Get(0).(int64), a.Error(1)
}