Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Added a constructor that passes the endpoint #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kberos
Copy link

@kberos kberos commented Feb 3, 2016

We need the flexibility to have a constructor that passes the endpoint to allow testing against a mock. The default original constructor applies the default GCM endpoint. The additional one allows to pass an endpoint of your choice.

…nstructor is used, it sets the Default GCM_SEND_ENDPOINT
@kberos
Copy link
Author

kberos commented Feb 3, 2016

Created new pull request because I had different git commit email. I signed the agreement.

Thanks,
Kosmas

@kroikie kroikie self-assigned this Feb 4, 2016
@@ -618,7 +631,7 @@ protected static StringBuilder newBody(String name, String value) {
protected static void addParameter(StringBuilder body, String name,
String value) {
nonNull(body).append('&')
.append(nonNull(name)).append('=').append(nonNull(value));
.append(nonNull(name)).append('=').append(nonNull(value));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove additional indentation please.

@kroikie
Copy link
Contributor

kroikie commented Feb 4, 2016

Thanks, this looks like a reasonable addition, could you add a test before I merge?

@kroikie
Copy link
Contributor

kroikie commented Feb 24, 2016

Hi @kberos thanks again for the PR, if you can add those tests I'd be happy to merge.

@kroikie
Copy link
Contributor

kroikie commented Mar 23, 2016

Hi @kberos looking fwd to merging this PR once you add those tests, thanks.

@cbornet
Copy link

cbornet commented Jul 27, 2016

👍 This is needed for transition from GCM to FCM

@matzew
Copy link

matzew commented Aug 31, 2016

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants