forked from sensu/sensu-go
/
mock_generic.go
42 lines (35 loc) · 894 Bytes
/
mock_generic.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
package testing
import (
"github.com/sensu/sensu-go/cli/client"
"github.com/sensu/sensu-go/types"
)
// Delete ...
func (c *MockClient) Delete(path string) error {
args := c.Called(path)
return args.Error(0)
}
// Get ...
func (c *MockClient) Get(path string, obj interface{}) error {
args := c.Called(path, obj)
return args.Error(0)
}
// List ...
func (c *MockClient) List(path string, objs interface{}, options *client.ListOptions) error {
args := c.Called(path, objs, options)
return args.Error(0)
}
// Post ...
func (c *MockClient) Post(path string, obj interface{}) error {
args := c.Called(path, obj)
return args.Error(0)
}
// Put ...
func (c *MockClient) Put(path string, obj interface{}) error {
args := c.Called(path, obj)
return args.Error(0)
}
// PutResource ...
func (c *MockClient) PutResource(r types.Wrapper) error {
args := c.Called(r)
return args.Error(0)
}