Loading android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java +72 −61 Original line number Diff line number Diff line Loading @@ -240,7 +240,10 @@ public class BluetoothPbapSimVcardManagerTest { @Test public void testGetSIMPhonebookNameList_orderByIndexed() { String prevLocalPhoneName = BluetoothPbapService.getLocalPhoneName(); try { final String localPhoneName = "test_local_phone_name"; BluetoothPbapService.setLocalPhoneName(localPhoneName); Cursor cursor = initManager(); List<String> nameList = Arrays.asList("D", "C", "A", "B"); Loading Loading @@ -270,10 +273,15 @@ public class BluetoothPbapSimVcardManagerTest { expectedResult.addAll(nameList); assertThat(result).isEqualTo(expectedResult); } finally { BluetoothPbapService.setLocalPhoneName(prevLocalPhoneName); } } @Test public void testGetSIMPhonebookNameList_orderByAlphabet() { String prevLocalPhoneName = BluetoothPbapService.getLocalPhoneName(); try { final String localPhoneName = "test_local_phone_name"; BluetoothPbapService.setLocalPhoneName(localPhoneName); Cursor cursor = initManager(); Loading Loading @@ -305,6 +313,9 @@ public class BluetoothPbapSimVcardManagerTest { expectedResult.add(0, localPhoneName); assertThat(result).isEqualTo(expectedResult); } finally { BluetoothPbapService.setLocalPhoneName(prevLocalPhoneName); } } @Test Loading Loading
android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java +72 −61 Original line number Diff line number Diff line Loading @@ -240,7 +240,10 @@ public class BluetoothPbapSimVcardManagerTest { @Test public void testGetSIMPhonebookNameList_orderByIndexed() { String prevLocalPhoneName = BluetoothPbapService.getLocalPhoneName(); try { final String localPhoneName = "test_local_phone_name"; BluetoothPbapService.setLocalPhoneName(localPhoneName); Cursor cursor = initManager(); List<String> nameList = Arrays.asList("D", "C", "A", "B"); Loading Loading @@ -270,10 +273,15 @@ public class BluetoothPbapSimVcardManagerTest { expectedResult.addAll(nameList); assertThat(result).isEqualTo(expectedResult); } finally { BluetoothPbapService.setLocalPhoneName(prevLocalPhoneName); } } @Test public void testGetSIMPhonebookNameList_orderByAlphabet() { String prevLocalPhoneName = BluetoothPbapService.getLocalPhoneName(); try { final String localPhoneName = "test_local_phone_name"; BluetoothPbapService.setLocalPhoneName(localPhoneName); Cursor cursor = initManager(); Loading Loading @@ -305,6 +313,9 @@ public class BluetoothPbapSimVcardManagerTest { expectedResult.add(0, localPhoneName); assertThat(result).isEqualTo(expectedResult); } finally { BluetoothPbapService.setLocalPhoneName(prevLocalPhoneName); } } @Test Loading