-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mananmukim/sc 146920/verify api client library changes #16
base: master
Are you sure you want to change the base?
Mananmukim/sc 146920/verify api client library changes #16
Conversation
This pull request has been linked to Shortcut Story #146920: Verify API Client Library Changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to work and match bouncer code changes.
@@ -8,4 +8,7 @@ | |||
@NoArgsConstructor | |||
public class ActivityResponse extends FCResponse { | |||
Double emails; | |||
Double online; | |||
Double social; | |||
Double employment; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all matches bouncer class ActivityResponse, except bouncer has added a new field "message."
private String givenName; | ||
private String phone; | ||
private String email; | ||
private Double risk; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all matches bouncer's MatchResponse, though bouncer has several more fields available now.
Assert.assertEquals("household", response.getFamilyName()); | ||
Assert.assertEquals("household", response.getPostalCode()); | ||
Assert.assertEquals("household", response.getCountry()); | ||
Assert.assertEquals("household", response.getCity()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test passes with new code.
Assert.assertEquals("0.82", String.valueOf(response.getEmails())); | ||
Assert.assertEquals("0.32", String.valueOf(response.getSocial())); | ||
Assert.assertEquals("0.78", String.valueOf(response.getEmployment())); | ||
Assert.assertEquals("0.91", String.valueOf(response.getOnline())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test passes with new code.
"emails" : 0.82, | ||
"online" : 0.91, | ||
"social" : 0.32, | ||
"employment" : 0.78 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mocked for test to pass. I do wonder if we should have a test for this library with live api calls in the future.
"familyName": "household", | ||
"phone" : "tangled", | ||
"email" : "self", | ||
"risk" : 0.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mocked for test to pass.
"emails" : 0.82, | ||
"online" : 0.91, | ||
"social" : 0.32, | ||
"employment" : 0.78 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass with mock.
"familyName": "household", | ||
"phone" : "tangled", | ||
"email" : "self", | ||
"risk" : 0.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass with mock.
Verify Response Updates