@Test public void testShouldNotBeAbleToExtractAppIdFromInvalidApk() throws Exception { AndroidApp app = new DefaultAndroidApp(new File(INVALID_APK_FILE)); try { app.getAppId(); Assert.fail("On an invalid apk the appId should not be found."); } catch (SelendroidException e) { } }
public String getAppId() throws AndroidSdkException { return getBasePackage() + ":" + getVersionName(); }
DefaultAndroidApp implements AndroidApp { public String getAppId() throws AndroidSdkException { return getBasePackage() + ":" + getVersionName(); } }
DefaultAndroidApp implements AndroidApp { public String getAppId() throws AndroidSdkException { return getBasePackage() + ":" + getVersionName(); } DefaultAndroidApp(File apkFile); }
DefaultAndroidApp implements AndroidApp { public String getAppId() throws AndroidSdkException { return getBasePackage() + ":" + getVersionName(); } DefaultAndroidApp(File apkFile); @Override String getBasePackage(); @Override String getMainActivity(); void setMainActivity(String mainActivity); @Override void deleteFileFromWithinApk(String file); @Override String getAbsolutePath(); @Override String getVersionName(); String getAppId(); }
DefaultAndroidApp implements AndroidApp { public String getAppId() throws AndroidSdkException { return getBasePackage() + ":" + getVersionName(); } DefaultAndroidApp(File apkFile); @Override String getBasePackage(); @Override String getMainActivity(); void setMainActivity(String mainActivity); @Override void deleteFileFromWithinApk(String file); @Override String getAbsolutePath(); @Override String getVersionName(); String getAppId();  }