From 56e74239d6b34df8f30ef046f0b0ff4ff0866a71 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Sun, 14 Jun 2015 23:53:32 -0800 Subject: first commit --- .../github.com/anachronistic/apns/client_mock.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Godeps/_workspace/src/github.com/anachronistic/apns/client_mock.go (limited to 'Godeps/_workspace/src/github.com/anachronistic/apns/client_mock.go') diff --git a/Godeps/_workspace/src/github.com/anachronistic/apns/client_mock.go b/Godeps/_workspace/src/github.com/anachronistic/apns/client_mock.go new file mode 100644 index 000000000..29a1f4b23 --- /dev/null +++ b/Godeps/_workspace/src/github.com/anachronistic/apns/client_mock.go @@ -0,0 +1,21 @@ +package apns + +import "github.com/stretchr/testify/mock" + +type MockClient struct { + mock.Mock +} + +func (m *MockClient) ConnectAndWrite(resp *PushNotificationResponse, payload []byte) (err error) { + return m.Called(resp, payload).Error(0) +} + +func (m *MockClient) Send(pn *PushNotification) (resp *PushNotificationResponse) { + r := m.Called(pn).Get(0) + if r != nil { + if r, ok := r.(*PushNotificationResponse); ok { + return r + } + } + return nil +} -- cgit v1.2.3-1-g7c22