diff options
Diffstat (limited to 'service/tests/src/com/android/server/uwb/UwbSessionNotificationManagerTest.java')
-rw-r--r-- | service/tests/src/com/android/server/uwb/UwbSessionNotificationManagerTest.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/service/tests/src/com/android/server/uwb/UwbSessionNotificationManagerTest.java b/service/tests/src/com/android/server/uwb/UwbSessionNotificationManagerTest.java index 20cb8cb1..06d78bd8 100644 --- a/service/tests/src/com/android/server/uwb/UwbSessionNotificationManagerTest.java +++ b/service/tests/src/com/android/server/uwb/UwbSessionNotificationManagerTest.java @@ -684,6 +684,46 @@ public class UwbSessionNotificationManagerTest { } @Test + public void testOnHybridSessionControllerConfigured() throws Exception { + mUwbSessionNotificationManager.onHybridSessionControllerConfigured(mUwbSession, + UwbUciConstants.STATUS_CODE_OK); + + verify(mIUwbRangingCallbacks).onHybridSessionControllerConfigured(eq(mSessionHandle), + argThat(p -> (p.getInt("status_code")) == UwbUciConstants.STATUS_CODE_OK)); + } + + @Test + public void testOnHybridSessionControllerConfigurationFailed() throws Exception { + mUwbSessionNotificationManager.onHybridSessionControllerConfigurationFailed(mUwbSession, + UwbUciConstants.STATUS_CODE_FAILED); + + verify(mIUwbRangingCallbacks).onHybridSessionControllerConfigurationFailed( + eq(mSessionHandle), + eq(RangingChangeReason.UNKNOWN), + argThat(p -> (p.getInt("status_code")) == UwbUciConstants.STATUS_CODE_FAILED)); + } + + @Test + public void testOnHybridSessionControleeConfigured() throws Exception { + mUwbSessionNotificationManager.onHybridSessionControleeConfigured(mUwbSession, + UwbUciConstants.STATUS_CODE_OK); + + verify(mIUwbRangingCallbacks).onHybridSessionControleeConfigured(eq(mSessionHandle), + argThat(p -> (p.getInt("status_code")) == UwbUciConstants.STATUS_CODE_OK)); + } + + @Test + public void testOnHybridSessionControleeConfigurationFailed() throws Exception { + mUwbSessionNotificationManager.onHybridSessionControleeConfigurationFailed(mUwbSession, + UwbUciConstants.STATUS_CODE_FAILED); + + verify(mIUwbRangingCallbacks).onHybridSessionControleeConfigurationFailed( + eq(mSessionHandle), + eq(RangingChangeReason.UNKNOWN), + argThat(p -> (p.getInt("status_code")) == UwbUciConstants.STATUS_CODE_FAILED)); + } + + @Test public void testOnRangingRoundsUpdateStatus() throws RemoteException { PersistableBundle bundle = new PersistableBundle(); mUwbSessionNotificationManager.onRangingRoundsUpdateStatus(mUwbSession, bundle); |