/
mock_q_asset_stats.go
50 lines (39 loc) · 1.63 KB
/
mock_q_asset_stats.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
package history
import (
"context"
"github.com/stretchr/testify/mock"
"github.com/TosinShada/monorepo/services/horizon/internal/db2"
"github.com/TosinShada/monorepo/xdr"
)
// MockQAssetStats is a mock implementation of the QAssetStats interface
type MockQAssetStats struct {
mock.Mock
}
func (m *MockQAssetStats) InsertAssetStats(ctx context.Context, assetStats []ExpAssetStat, batchSize int) error {
a := m.Called(ctx, assetStats, batchSize)
return a.Error(0)
}
func (m *MockQAssetStats) InsertAssetStat(ctx context.Context, assetStat ExpAssetStat) (int64, error) {
a := m.Called(ctx, assetStat)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQAssetStats) UpdateAssetStat(ctx context.Context, assetStat ExpAssetStat) (int64, error) {
a := m.Called(ctx, assetStat)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQAssetStats) GetAssetStat(ctx context.Context, assetType xdr.AssetType, assetCode, assetIssuer string) (ExpAssetStat, error) {
a := m.Called(ctx, assetType, assetCode, assetIssuer)
return a.Get(0).(ExpAssetStat), a.Error(1)
}
func (m *MockQAssetStats) RemoveAssetStat(ctx context.Context, assetType xdr.AssetType, assetCode, assetIssuer string) (int64, error) {
a := m.Called(ctx, assetType, assetCode, assetIssuer)
return a.Get(0).(int64), a.Error(1)
}
func (m *MockQAssetStats) GetAssetStats(ctx context.Context, assetCode, assetIssuer string, page db2.PageQuery) ([]ExpAssetStat, error) {
a := m.Called(ctx, assetCode, assetIssuer, page)
return a.Get(0).([]ExpAssetStat), a.Error(1)
}
func (m *MockQAssetStats) CountTrustLines(ctx context.Context) (int, error) {
a := m.Called(ctx)
return a.Get(0).(int), a.Error(1)
}