fix FakeADBServer testcases which expect certain commands...however due to previous commits these commands are now quoted

This commit is contained in:
Kris Heid 2021-03-05 14:37:12 +01:00
parent 597102ab83
commit 3ace8c814d
2 changed files with 4 additions and 4 deletions

View File

@ -99,7 +99,7 @@ public class MockedTestCases {
@Test
public void testExecuteShell() throws Exception {
server.add("serial-123");
server.expectShell("serial-123", "ls -l").returns("total 0");
server.expectShell("serial-123", "ls '-l'").returns("total 0");
JadbDevice device = connection.getDevices().get(0);
device.executeShell("ls", "-l");
}

View File

@ -44,7 +44,7 @@ public class PackageManagerTest {
String response = "package:/system/priv-app/Contacts.apk-com.android.contacts\n" +
"package:/system/priv-app/Teleservice.apk-com.android.phone";
server.expectShell(DEVICE_SERIAL, "pm list packages").returns(response);
server.expectShell(DEVICE_SERIAL, "pm 'list' 'packages'").returns(response);
//Act
List<Package> actual = new PackageManager(device).getPackages();
@ -64,7 +64,7 @@ public class PackageManagerTest {
"[malformed_line]\n" +
"package:/system/priv-app/Teleservice.apk-com.android.phone";
server.expectShell(DEVICE_SERIAL, "pm list packages").returns(response);
server.expectShell(DEVICE_SERIAL, "pm 'list' 'packages'").returns(response);
//Act
List<Package> actual = new PackageManager(device).getPackages();
@ -79,7 +79,7 @@ public class PackageManagerTest {
List<Package> expected = new ArrayList<>();
String response = "";
server.expectShell(DEVICE_SERIAL, "pm list packages").returns(response);
server.expectShell(DEVICE_SERIAL, "pm 'list' 'packages'").returns(response);
//Act
List<Package> actual = new PackageManager(device).getPackages();