Loading android/app/tests/unit/src/com/android/bluetooth/TestUtils.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -186,6 +186,9 @@ public class TestUtils { verify(adapterService, timeout(SERVICE_TOGGLE_TIMEOUT_MS)).onProfileServiceStateChanged( verify(adapterService, timeout(SERVICE_TOGGLE_TIMEOUT_MS)).onProfileServiceStateChanged( profile.capture(), eq(BluetoothAdapter.STATE_OFF)); profile.capture(), eq(BluetoothAdapter.STATE_OFF)); Assert.assertEquals(profileServiceClass.getName(), profile.getValue().getClass().getName()); Assert.assertEquals(profileServiceClass.getName(), profile.getValue().getClass().getName()); ArgumentCaptor<ProfileService> profile2 = ArgumentCaptor.forClass(profileServiceClass); verify(adapterService, timeout(SERVICE_TOGGLE_TIMEOUT_MS)).removeProfile(profile2.capture()); Assert.assertEquals(profileServiceClass.getName(), profile2.getValue().getClass().getName()); } } /** /** Loading Loading
android/app/tests/unit/src/com/android/bluetooth/TestUtils.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -186,6 +186,9 @@ public class TestUtils { verify(adapterService, timeout(SERVICE_TOGGLE_TIMEOUT_MS)).onProfileServiceStateChanged( verify(adapterService, timeout(SERVICE_TOGGLE_TIMEOUT_MS)).onProfileServiceStateChanged( profile.capture(), eq(BluetoothAdapter.STATE_OFF)); profile.capture(), eq(BluetoothAdapter.STATE_OFF)); Assert.assertEquals(profileServiceClass.getName(), profile.getValue().getClass().getName()); Assert.assertEquals(profileServiceClass.getName(), profile.getValue().getClass().getName()); ArgumentCaptor<ProfileService> profile2 = ArgumentCaptor.forClass(profileServiceClass); verify(adapterService, timeout(SERVICE_TOGGLE_TIMEOUT_MS)).removeProfile(profile2.capture()); Assert.assertEquals(profileServiceClass.getName(), profile2.getValue().getClass().getName()); } } /** /** Loading