Add test case for CrossSimCallingPreferenceControllerTest
Test is currently failing due to no methods present. Since we want the controller to be unavailable for now, I chose to write a method verifying that state. Bug: 174566774 Test: atest -c CrossSimCallingPreferenceControllerTest Change-Id: Iced0ac7bbd3482907312182a632dcf3215c55391
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.network.telephony;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.Mockito.spy;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -23,7 +25,10 @@ import android.content.Context;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@@ -40,4 +45,10 @@ public class CrossSimCallingPreferenceControllerTest {
|
||||
mController = new CrossSimCallingPreferenceController(mContext, "cross_sim_calling_key");
|
||||
mController.init(SUB_ID);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void controller_isUnavailable() {
|
||||
assertThat(mController.getAvailabilityStatus())
|
||||
.isEqualTo(BasePreferenceController.CONDITIONALLY_UNAVAILABLE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user