Is there an APNs stub available with Pushy for unit testing?
52 views
Skip to first unread message
Paul Brown
unread,
Aug 23, 2017, 5:19:57 AM8/23/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pushy
I was wondering if Pushy provide an APNs stub for use in unit tests, before I write my own one?
Thanks!
Paul Brown
unread,
Aug 23, 2017, 5:27:57 AM8/23/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pushy
I see that there is a MockApnsServer class, but am unsure if this is suitable for unit tests (docs mention integration tests, and also "most users will not need to interact with mock servers."
j...@turo.com
unread,
Aug 27, 2017, 3:43:05 PM8/27/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pushy
Yes, it's fine for unit tests (excluding philosophical concerns about where to draw the line between a "unit" and "integration" test). The warning that most users will not need to interact with mock servers is to let folks know that they don't need to use a mock server in the course of sending "real" push notifications. Most users will not write tests using the mock server, but there's no reason not to.