-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_q_participants.go
47 lines (37 loc) · 1.45 KB
/
mock_q_participants.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"
"github.com/shantanu-hashcash/go/support/db"
)
// MockQParticipants is a mock implementation of the QParticipants interface
type MockQParticipants struct {
mock.Mock
}
func (m *MockQParticipants) CreateAccounts(ctx context.Context, addresses []string, maxBatchSize int) (map[string]int64, error) {
a := m.Called(ctx, addresses, maxBatchSize)
return a.Get(0).(map[string]int64), a.Error(1)
}
func (m *MockQParticipants) NewTransactionParticipantsBatchInsertBuilder() TransactionParticipantsBatchInsertBuilder {
a := m.Called()
return a.Get(0).(TransactionParticipantsBatchInsertBuilder)
}
// MockTransactionParticipantsBatchInsertBuilder is a mock implementation of the
// TransactionParticipantsBatchInsertBuilder interface
type MockTransactionParticipantsBatchInsertBuilder struct {
mock.Mock
}
func (m *MockTransactionParticipantsBatchInsertBuilder) Add(transactionID int64, accountID FutureAccountID) error {
a := m.Called(transactionID, accountID)
return a.Error(0)
}
func (m *MockTransactionParticipantsBatchInsertBuilder) Exec(ctx context.Context, session db.SessionInterface) error {
a := m.Called(ctx, session)
return a.Error(0)
}
// NewOperationParticipantBatchInsertBuilder mock
func (m *MockQParticipants) NewOperationParticipantBatchInsertBuilder() OperationParticipantBatchInsertBuilder {
a := m.Called()
v := a.Get(0)
return v.(OperationParticipantBatchInsertBuilder)
}