forked from RichardKnop/go-mailchimp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_mock.go
102 lines (83 loc) · 2.22 KB
/
client_mock.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
package mailchimp
import (
"net/url"
"github.com/stretchr/testify/mock"
)
// ClientMock is a mocked object implementing MailchimpInterface
type ClientMock struct {
mock.Mock
}
// CheckSubscription ...
func (_m *ClientMock) CheckSubscription(listID string, email string) (*MemberResponse, error) {
ret := _m.Called(listID, email)
var r0 *MemberResponse
if rf, ok := ret.Get(0).(func(string, string) *MemberResponse); ok {
r0 = rf(listID, email)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*MemberResponse)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(listID, email)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Subscribe ...
func (_m *ClientMock) Subscribe(listID string, email string, mergeFields map[string]interface{}) (*MemberResponse, error) {
ret := _m.Called(listID, email, mergeFields)
var r0 *MemberResponse
if rf, ok := ret.Get(0).(func(string, string, map[string]interface{}) *MemberResponse); ok {
r0 = rf(listID, email, mergeFields)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*MemberResponse)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, map[string]interface{}) error); ok {
r1 = rf(listID, email, mergeFields)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateSubscription ...
func (_m *ClientMock) UpdateSubscription(listID string, email string, mergeFields map[string]interface{}) (*MemberResponse, error) {
ret := _m.Called(listID, email, mergeFields)
var r0 *MemberResponse
if rf, ok := ret.Get(0).(func(string, string, map[string]interface{}) *MemberResponse); ok {
r0 = rf(listID, email, mergeFields)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*MemberResponse)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, map[string]interface{}) error); ok {
r1 = rf(listID, email, mergeFields)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetBaseURL ...
func (_m *ClientMock) SetBaseURL(baseURL *url.URL) {
_m.Called(baseURL)
}
// GetBaseURL ...
func (_m *ClientMock) GetBaseURL() *url.URL {
ret := _m.Called()
var r0 *url.URL
if rf, ok := ret.Get(0).(func() *url.URL); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*url.URL)
}
}
return r0
}