-
Notifications
You must be signed in to change notification settings - Fork 624
[FLoC] Change FLoC instrumental tests to be unit tests. #1058
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
Conversation
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
cache and update to Firebase Segmentation backend. CL also contains unit tests. (The http client is not implemented yet.)
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
…k into arete-floc
implementation by file implementation.
…k into arete-floc
Codecov Report
@@ Coverage Diff @@
## floc-master #1058 +/- ##
=================================================
+ Coverage 57.09% 57.54% +0.45%
- Complexity 6211 6245 +34
=================================================
Files 644 644
Lines 31526 31526
Branches 4317 4317
=================================================
+ Hits 17999 18142 +143
+ Misses 12097 11949 -148
- Partials 1430 1435 +5
Continue to review full report at Codecov.
|
import com.google.firebase.FirebaseApp; | ||
import com.google.firebase.FirebaseOptions; | ||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.robolectric.RobolectricTestRunner; | ||
|
||
/** Instrumented tests for {@link CustomInstallationIdCache} */ |
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.
nit: Update the javadocs.
TestOnCompleteListener<Void> onCompleteListener = new TestOnCompleteListener<>(); | ||
firebaseSegmentation | ||
.setCustomInstallationId(CUSTOM_INSTALLATION_ID) | ||
.addOnCompleteListener(taskExecutor, onCompleteListener); | ||
onCompleteListener.await(); |
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.
Optional: We can move this into an initialization method.
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.
Hmmm, first, I don't think we can put this entire block into initialization() since it's not always the same in every test case.
If you meant that move TestOnCompleteListener onCompleteListener = new TestOnCompleteListener<>() into initialization, I also think putting here is better since it's a whole logic block with the two lines below. Also, if a test case uses onCompleteListener more than once, then putting it in initialization is also not perfect.
No description provided.