-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsessionx.go
More file actions
40 lines (28 loc) · 788 Bytes
/
sessionx.go
File metadata and controls
40 lines (28 loc) · 788 Bytes
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
package gocqlxmock
import (
"context"
"github.com/Guilospanck/igocqlx"
"github.com/stretchr/testify/mock"
)
type SessionxMock struct {
mock.Mock
}
func (mock *SessionxMock) ContextQuery(ctx context.Context, stmt string, names []string) igocqlx.IQueryx {
args := mock.Called(ctx, stmt, names)
return args.Get(0).(igocqlx.IQueryx)
}
func (mock *SessionxMock) Query(stmt string, names []string) igocqlx.IQueryx {
args := mock.Called(stmt, names)
return args.Get(0).(igocqlx.IQueryx)
}
func (mock *SessionxMock) ExecStmt(stmt string) error {
args := mock.Called(stmt)
return args.Error(0)
}
func (mock *SessionxMock) AwaitSchemaAgreement(ctx context.Context) error {
args := mock.Called(ctx)
return args.Error(0)
}
func (mock *SessionxMock) Close() {
mock.Called()
}