Update the FlashNotificationsPreferenceFragmentTest to return correct
metric category **Root Cause** The test was written when the metric category is set to 0. After we update the metric category to FLASH_NOTIFICATION_SETTINGS in the FlashNotificationsPrefereenceFragment, we forgot to update the test. Bug: 279082331 Test: atest FlashNotificationsPreferenceFragmentTest Change-Id: Icd709bd9e571ca264226d0ca860e5c482eae3927
This commit is contained in:
@@ -22,6 +22,7 @@ import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
@@ -66,8 +67,9 @@ public class FlashNotificationsPreferenceFragmentTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getMetricsCategory_isZero() {
|
||||
assertThat(mFragment.getMetricsCategory()).isEqualTo(0); // TODO
|
||||
public void getMetricsCategory_returnsCorrectCategory() {
|
||||
assertThat(mFragment.getMetricsCategory()).isEqualTo(
|
||||
SettingsEnums.FLASH_NOTIFICATION_SETTINGS);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user