use of android.companion.AssociationRequest in project robolectric by robolectric.
the class ShadowCompanionDeviceManagerTest method testAssociate.
@Test
public void testAssociate() {
AssociationRequest request = new AssociationRequest.Builder().build();
CompanionDeviceManager.Callback callback = new CompanionDeviceManager.Callback() {
@Override
public void onDeviceFound(IntentSender chooserLauncher) {
}
@Override
public void onFailure(CharSequence error) {
}
};
companionDeviceManager.associate(request, callback, null);
assertThat(shadowCompanionDeviceManager.getLastAssociationRequest()).isSameInstanceAs(request);
assertThat(shadowCompanionDeviceManager.getLastAssociationCallback()).isSameInstanceAs(callback);
}
Aggregations