Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e87a552 authored by Jeremy Goldman's avatar Jeremy Goldman
Browse files

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
parent 836df5eb
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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);
    }
}