use of android.telephony.ims.RegistrationManager.RegistrationCallback in project android_frameworks_opt_telephony by LineageOS.
the class ImsRegistrationCallbackHelperTest method testImsOnRegistering.
@Test
@SmallTest
public void testImsOnRegistering() {
// Verify the RegistrationCallback should not be null
RegistrationCallback callback = mRegistrationCallbackHelper.getCallback();
assertNotNull(callback);
// When onRegistering is called, the registration state should be
// REGISTRATION_STATE_REGISTERING
callback.onRegistering(AccessNetworkType.IWLAN);
// The registration state should be REGISTRATION_STATE_REGISTERING
assertEquals(RegistrationManager.REGISTRATION_STATE_REGISTERING, mRegistrationCallbackHelper.getImsRegistrationState());
verify(mMockRegistrationUpdate).handleImsRegistering(anyInt());
}
use of android.telephony.ims.RegistrationManager.RegistrationCallback in project android_frameworks_opt_telephony by LineageOS.
the class ImsRegistrationCallbackHelperTest method testImsUnRegistered.
@Test
@SmallTest
public void testImsUnRegistered() {
// Verify the RegistrationCallback should not be null
RegistrationCallback callback = mRegistrationCallbackHelper.getCallback();
assertNotNull(callback);
// When onUnregistered is called, the registration state should be
// REGISTRATION_STATE_NOT_REGISTERED
ImsReasonInfo reasonInfo = new ImsReasonInfo(ImsReasonInfo.CODE_REGISTRATION_ERROR, 0);
callback.onUnregistered(reasonInfo);
// The registration state should be REGISTRATION_STATE_NOT_REGISTERED
assertEquals(RegistrationManager.REGISTRATION_STATE_NOT_REGISTERED, mRegistrationCallbackHelper.getImsRegistrationState());
verify(mMockRegistrationUpdate).handleImsUnregistered(reasonInfo);
}
use of android.telephony.ims.RegistrationManager.RegistrationCallback in project android_frameworks_opt_telephony by LineageOS.
the class ImsRegistrationCallbackHelperTest method testSubscriberAssociatedUriChanged.
@Test
@SmallTest
public void testSubscriberAssociatedUriChanged() {
// Verify the RegistrationCallback should not be null
RegistrationCallback callback = mRegistrationCallbackHelper.getCallback();
assertNotNull(callback);
// When onSubscriberAssociatedUriChanged is called
Uri[] uris = new Uri[0];
callback.onSubscriberAssociatedUriChanged(uris);
// The handleImsSubscriberAssociatedUriChanged should be called
verify(mMockRegistrationUpdate).handleImsSubscriberAssociatedUriChanged(uris);
}
use of android.telephony.ims.RegistrationManager.RegistrationCallback in project android_frameworks_opt_telephony by LineageOS.
the class ImsRegistrationCallbackHelperTest method testImsOnRegistered.
@Test
@SmallTest
public void testImsOnRegistered() {
// Verify the RegistrationCallback should not be null
RegistrationCallback callback = mRegistrationCallbackHelper.getCallback();
assertNotNull(callback);
// When onRegistered is called, the registration state should be
// REGISTRATION_STATE_REGISTERED
callback.onRegistered(AccessNetworkType.IWLAN);
assertEquals(RegistrationManager.REGISTRATION_STATE_REGISTERED, mRegistrationCallbackHelper.getImsRegistrationState());
verify(mMockRegistrationUpdate).handleImsRegistered(anyInt());
}
Aggregations