-
Notifications
You must be signed in to change notification settings - Fork 69
/
mocks.go
115 lines (80 loc) · 2.54 KB
/
mocks.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//revive:disable:exported
package datastream
import (
"context"
"github.com/stretchr/testify/mock"
)
type Mock struct {
mock.Mock
}
var _ DS = &Mock{}
func (m *Mock) CreateStream(ctx context.Context, r CreateStreamRequest) (*DetailedStreamVersion, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*DetailedStreamVersion), args.Error(1)
}
func (m *Mock) GetStream(ctx context.Context, r GetStreamRequest) (*DetailedStreamVersion, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*DetailedStreamVersion), args.Error(1)
}
func (m *Mock) UpdateStream(ctx context.Context, r UpdateStreamRequest) (*DetailedStreamVersion, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*DetailedStreamVersion), args.Error(1)
}
func (m *Mock) DeleteStream(ctx context.Context, r DeleteStreamRequest) error {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return args.Error(0)
}
return nil
}
func (m *Mock) ListStreams(ctx context.Context, r ListStreamsRequest) ([]StreamDetails, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).([]StreamDetails), args.Error(1)
}
func (m *Mock) ActivateStream(ctx context.Context, r ActivateStreamRequest) (*DetailedStreamVersion, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*DetailedStreamVersion), args.Error(1)
}
func (m *Mock) DeactivateStream(ctx context.Context, r DeactivateStreamRequest) (*DetailedStreamVersion, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*DetailedStreamVersion), args.Error(1)
}
func (m *Mock) GetActivationHistory(ctx context.Context, r GetActivationHistoryRequest) ([]ActivationHistoryEntry, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).([]ActivationHistoryEntry), args.Error(1)
}
func (m *Mock) GetProperties(ctx context.Context, r GetPropertiesRequest) (*PropertiesDetails, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*PropertiesDetails), args.Error(1)
}
func (m *Mock) GetDatasetFields(ctx context.Context, r GetDatasetFieldsRequest) (*DataSets, error) {
args := m.Called(ctx, r)
if args.Get(0) == nil {
return nil, args.Error(1)
}
return args.Get(0).(*DataSets), args.Error(1)
}