File tree Expand file tree Collapse file tree
firebase-perf/src/test/java/com/google/firebase/perf/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -497,6 +497,20 @@ public void getIsServiceCollectionEnabled_sdkDisabledVersionFlagNoFrc_returnDefa
497497 assertThat (testConfigResolver .getIsServiceCollectionEnabled ()).isTrue ();
498498 }
499499
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+
500514 @ Test
501515 public void getIsPerformanceCollectionEnabled_notDeviceCacheOrMetadata_returnsNull () {
502516 when (mockDeviceCacheManager .getBoolean (FIREBASE_PERFORMANCE_COLLECTION_ENABLED_CACHE_KEY ))
You can’t perform that action at this time.
0 commit comments