/
mock_q_liquidity_pools.go
47 lines (37 loc) · 1.42 KB
/
mock_q_liquidity_pools.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
package history
import (
"context"
"github.com/stretchr/testify/mock"
)
// MockQLiquidityPools is a mock implementation of the QAccounts interface
type MockQLiquidityPools struct {
mock.Mock
}
func (m *MockQLiquidityPools) UpsertLiquidityPools(ctx context.Context, lps []LiquidityPool) error {
a := m.Called(ctx, lps)
return a.Error(0)
}
func (m *MockQLiquidityPools) CountLiquidityPools(ctx context.Context) (int, error) {
a := m.Called(ctx)
return a.Get(0).(int), a.Error(1)
}
func (m *MockQLiquidityPools) GetLiquidityPoolsByID(ctx context.Context, poolIDs []string) ([]LiquidityPool, error) {
a := m.Called(ctx, poolIDs)
return a.Get(0).([]LiquidityPool), a.Error(1)
}
func (m *MockQLiquidityPools) FindLiquidityPoolByID(ctx context.Context, liquidityPoolID string) (LiquidityPool, error) {
a := m.Called(ctx, liquidityPoolID)
return a.Get(0).(LiquidityPool), a.Error(1)
}
func (m *MockQLiquidityPools) StreamAllLiquidityPools(ctx context.Context, callback func(LiquidityPool) error) error {
a := m.Called(ctx, callback)
return a.Error(0)
}
func (m *MockQLiquidityPools) GetUpdatedLiquidityPools(ctx context.Context, sequence uint32) ([]LiquidityPool, error) {
a := m.Called(ctx, sequence)
return a.Get(0).([]LiquidityPool), a.Error(1)
}
func (m *MockQLiquidityPools) CompactLiquidityPools(ctx context.Context, cutOffSequence uint32) (int64, error) {
a := m.Called(ctx, cutOffSequence)
return a.Get(0).(int64), a.Error(1)
}