OSDN Git Service

Use proper string formatting for the "Active device" string
authorPavlin Radoslavov <pavlin@google.com>
Thu, 8 Feb 2018 01:23:12 +0000 (17:23 -0800)
committerPavlin Radoslavov <pavlin@google.com>
Fri, 9 Feb 2018 22:53:14 +0000 (14:53 -0800)
Updated testContextMock() how it checks the bluetooth_connected string.

Bug: 72317067
Test: Unit test updated:
      make ROBOTEST_FILTER=BluetoothDetailsHeaderControllerTest \
                           RunSettingsRoboTests
      Manual: two headsets and switching the active device
Change-Id: I3db178d71543e4dfa437544350c58241860ae703
Merged-In: I3db178d71543e4dfa437544350c58241860ae703
(cherry picked from commit b58b006e44ecf73ad31f79bade8149df7d903dc3)

tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsHeaderControllerTest.java

index 98a3580..d99e057 100644 (file)
@@ -79,7 +79,7 @@ public class BluetoothDetailsHeaderControllerTest extends BluetoothDetailsContro
      */
     @Test
     public void testContextMock() {
-        assertThat(mContext.getString(R.string.bluetooth_connected)).isEqualTo("Connected");
+        assertThat(mContext.getString(R.string.bluetooth_connected)).isNotNull();
     }
 
     @Test