use of android.telephony.ims.ImsMmTelManager.RegistrationCallback in project robolectric by robolectric.
the class ShadowImsMmTelManagerTest method registerImsRegistrationCallback_imsRegistering_onRegisteringInvoked.
@Test
public void registerImsRegistrationCallback_imsRegistering_onRegisteringInvoked() throws ImsException {
RegistrationCallback registrationCallback = mock(RegistrationCallback.class);
shadowImsMmTelManager.registerImsRegistrationCallback(Runnable::run, registrationCallback);
shadowImsMmTelManager.setImsRegistering(ImsRegistrationImplBase.REGISTRATION_TECH_LTE);
verify(registrationCallback).onRegistering(ImsRegistrationImplBase.REGISTRATION_TECH_LTE);
shadowImsMmTelManager.unregisterImsRegistrationCallback(registrationCallback);
shadowImsMmTelManager.setImsRegistering(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN);
verifyNoMoreInteractions(registrationCallback);
}
use of android.telephony.ims.ImsMmTelManager.RegistrationCallback in project robolectric by robolectric.
the class ShadowImsMmTelManagerTest method registerImsRegistrationCallback_imsRegistered_onRegisteredInvoked.
@Test
public void registerImsRegistrationCallback_imsRegistered_onRegisteredInvoked() throws ImsException {
RegistrationCallback registrationCallback = mock(RegistrationCallback.class);
shadowImsMmTelManager.registerImsRegistrationCallback(Runnable::run, registrationCallback);
shadowImsMmTelManager.setImsRegistered(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN);
verify(registrationCallback).onRegistered(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN);
shadowImsMmTelManager.unregisterImsRegistrationCallback(registrationCallback);
shadowImsMmTelManager.setImsRegistered(ImsRegistrationImplBase.REGISTRATION_TECH_LTE);
verifyNoMoreInteractions(registrationCallback);
}
use of android.telephony.ims.ImsMmTelManager.RegistrationCallback in project robolectric by robolectric.
the class ShadowImsMmTelManagerTest method registerImsRegistrationCallback_imsUnregistered_onUnregisteredInvoked.
@Test
public void registerImsRegistrationCallback_imsUnregistered_onUnregisteredInvoked() throws ImsException {
RegistrationCallback registrationCallback = mock(RegistrationCallback.class);
shadowImsMmTelManager.registerImsRegistrationCallback(Runnable::run, registrationCallback);
ImsReasonInfo imsReasonInfoWithCallbackRegistered = new ImsReasonInfo();
shadowImsMmTelManager.setImsUnregistered(imsReasonInfoWithCallbackRegistered);
verify(registrationCallback).onUnregistered(imsReasonInfoWithCallbackRegistered);
ImsReasonInfo imsReasonInfoAfterUnregisteringCallback = new ImsReasonInfo();
shadowImsMmTelManager.unregisterImsRegistrationCallback(registrationCallback);
shadowImsMmTelManager.setImsUnregistered(imsReasonInfoAfterUnregisteringCallback);
verifyNoMoreInteractions(registrationCallback);
}
Aggregations