/
mock_q_data.go
42 lines (33 loc) · 1.04 KB
/
mock_q_data.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
package history
import (
"github.com/stretchr/testify/mock"
"github.com/AnneNamuli/go-stellar/xdr"
)
// MockQData is a mock implementation of the QAccounts interface
type MockQData struct {
mock.Mock
}
func (m *MockQData) GetAccountDataByKeys(keys []xdr.LedgerKeyData) ([]Data, error) {
a := m.Called()
return a.Get(0).([]Data), a.Error(1)
}
func (m *MockQData) CountAccountsData() (int, error) {
a := m.Called()
return a.Get(0).(int), a.Error(1)
}
func (m *MockQData) NewAccountDataBatchInsertBuilder(maxBatchSize int) AccountDataBatchInsertBuilder {
a := m.Called(maxBatchSize)
return a.Get(0).(AccountDataBatchInsertBuilder)
}
func (m *MockQData) InsertAccountData(entry xdr.LedgerEntry) (int64, error) {
a := m.Called(entry)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQData) UpdateAccountData(entry xdr.LedgerEntry) (int64, error) {
a := m.Called(entry)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQData) RemoveAccountData(key xdr.LedgerKeyData) (int64, error) {
a := m.Called(key)
return a.Get(0).(int64), a.Error(1)
}