forked from stellar/go
/
mock_q_offers.go
57 lines (45 loc) · 1.53 KB
/
mock_q_offers.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
package history
import (
"github.com/stretchr/testify/mock"
"github.com/stellar/go/xdr"
)
// MockQOffers is a mock implementation of the QOffers interface
type MockQOffers struct {
mock.Mock
}
func (m *MockQOffers) GetAllOffers() ([]Offer, error) {
a := m.Called()
return a.Get(0).([]Offer), a.Error(1)
}
func (m *MockQOffers) GetOffersByIDs(ids []int64) ([]Offer, error) {
a := m.Called(ids)
return a.Get(0).([]Offer), a.Error(1)
}
func (m *MockQOffers) GetUpdatedOffers(newerThanSequence uint32) ([]Offer, error) {
a := m.Called(newerThanSequence)
return a.Get(0).([]Offer), a.Error(1)
}
func (m *MockQOffers) GetRemovedOffers(removedAfterSequence uint32) ([]xdr.Int64, error) {
a := m.Called(removedAfterSequence)
return a.Get(0).([]xdr.Int64), a.Error(1)
}
func (m *MockQOffers) CountOffers() (int, error) {
a := m.Called()
return a.Get(0).(int), a.Error(1)
}
func (m *MockQOffers) NewOffersBatchInsertBuilder(maxBatchSize int) OffersBatchInsertBuilder {
a := m.Called(maxBatchSize)
return a.Get(0).(OffersBatchInsertBuilder)
}
func (m *MockQOffers) UpdateOffer(offer xdr.OfferEntry, lastModifiedLedger xdr.Uint32) (int64, error) {
a := m.Called(offer, lastModifiedLedger)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQOffers) RemoveOffer(offerID xdr.Int64, lastModifiedLedger uint32) (int64, error) {
a := m.Called(offerID, lastModifiedLedger)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQOffers) CompactOffers(cutOffSequence uint32) (int64, error) {
a := m.Called(cutOffSequence)
return a.Get(0).(int64), a.Error(1)
}