-
Notifications
You must be signed in to change notification settings - Fork 79
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
Collect Device Data #339
Collect Device Data #339
Conversation
This reverts commit 24ef63a.
…lector deviceData
// For testing | ||
static Class PayPalDataCollectorClass; | ||
static NSString *PayPalDataCollectorClassString = @"PPDataCollector"; |
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.
I think we can do this with OCMock instead (see docs under the 3.2 Stubs and verification section).
This project doesn't use OCMock, so I tried to import it. OCMock has an SPM bug, which I reported on their GitHub. So rather than use a 2nd package manager for the project to fetch OCMock, I went for this approach.
We can always change this testing situation in the future. Let me know what ya'll think.
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 approach seems reasonable to me. No need to introduce another package manager for testing.
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 looks good to me! Should we mark collectDeviceData
on BTDropInRequest
as deprecated if it's always going to be requested and exposed now?
@sarahkoop There is no |
Changes
deviceData
onBTDropInResult
Motivation
collectDeviceData
to true on yourDropInRequest
here. If you do, only then will you get back device data on yourDropInResult
here.collectDeviceData
boolean property on their request, and instead always includedeviceData
on the DropInResult.Concerns
I had a concern about performance, but used XCTest's
measure
function to time this test. I get roughly the same time to initialize the DropInResult with and without the call to PPDataCollector. I think it is OK to add.Checklist
Authors
@scannillo