File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
firebase-perf/src/test/java/com/google/firebase/perf/config Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -497,6 +497,20 @@ public void getIsServiceCollectionEnabled_sdkDisabledVersionFlagNoFrc_returnDefa
497
497
assertThat (testConfigResolver .getIsServiceCollectionEnabled ()).isTrue ();
498
498
}
499
499
500
+ @ Test
501
+ public void getIsPerformanceCollectionCacheAvailable_noDeviceCache_returnsFalse () {
502
+ when (mockDeviceCacheManager .getBoolean (FIREBASE_PERFORMANCE_COLLECTION_ENABLED_CACHE_KEY ))
503
+ .thenReturn (Optional .absent ());
504
+ assertThat (testConfigResolver .isCollectionEnabledCacheAvailable ()).isFalse ();
505
+ }
506
+
507
+ @ Test
508
+ public void getIsPerformanceCollectionCacheAvailable_hasDeviceCache_returnsTrue () {
509
+ when (mockDeviceCacheManager .getBoolean (FIREBASE_PERFORMANCE_COLLECTION_ENABLED_CACHE_KEY ))
510
+ .thenReturn (Optional .of (true ));
511
+ assertThat (testConfigResolver .isCollectionEnabledCacheAvailable ()).isTrue ();
512
+ }
513
+
500
514
@ Test
501
515
public void getIsPerformanceCollectionEnabled_notDeviceCacheOrMetadata_returnsNull () {
502
516
when (mockDeviceCacheManager .getBoolean (FIREBASE_PERFORMANCE_COLLECTION_ENABLED_CACHE_KEY ))
You can’t perform that action at this time.
0 commit comments