-
Notifications
You must be signed in to change notification settings - Fork 69
/
mocks.go
45 lines (31 loc) · 951 Bytes
/
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
//revive:disable:exported
package hapi
import (
"context"
"github.com/stretchr/testify/mock"
)
type Mock struct {
mock.Mock
}
var _ HAPI = &Mock{}
func (m *Mock) DeleteEdgeHostname(ctx context.Context, request DeleteEdgeHostnameRequest) (*DeleteEdgeHostnameResponse, error) {
args := m.Called(ctx, request)
if args.Error(1) != nil {
return nil, args.Error(1)
}
return args.Get(0).(*DeleteEdgeHostnameResponse), nil
}
func (m *Mock) GetEdgeHostname(ctx context.Context, id int) (*GetEdgeHostnameResponse, error) {
args := m.Called(ctx, id)
if args.Error(1) != nil {
return nil, args.Error(1)
}
return args.Get(0).(*GetEdgeHostnameResponse), nil
}
func (m *Mock) UpdateEdgeHostname(ctx context.Context, request UpdateEdgeHostnameRequest) (*UpdateEdgeHostnameResponse, error) {
args := m.Called(ctx, request)
if args.Error(1) != nil {
return nil, args.Error(1)
}
return args.Get(0).(*UpdateEdgeHostnameResponse), nil
}