AppPackage implements Closeable { public List<AppInfo> getApplications() { return Collections.unmodifiableList(applications); } AppPackage(File file);  AppPackage(InputStream input);  AppPackage(File file, File contentFolder, boolean processAppDirectory);  AppPackage(InputStream input, File contentFolder, boolean processAppDirectory);  AppPackage(File file, boolean processAppDirectory);  AppPackage(InputStream input, boolean processAppDirectory); static void extractToDirectory(File directory, File appPackageFile); static void createAppPackageFile(File fileToBeCreated, File directory); File tempDirectory(); @Override void close(); void cleanContent(); String getAppPackageName(); String getAppPackageVersion(); String getAppPackageGroupId(); String getAppPackageDescription(); String getAppPackageDisplayName(); String getDtEngineVersion(); List<String> getClassPath(); Collection<String> getConfigs(); File resourcesDirectory(); List<AppInfo> getApplications(); List<String> getAppJars(); List<String> getAppJsonFiles(); List<String> getAppPropertiesFiles(); Set<String> getRequiredProperties(); Map<String, PropertyInfo> getDefaultProperties(); void processAppDirectory(boolean skipJars); static final String ATTRIBUTE_DT_ENGINE_VERSION; static final String ATTRIBUTE_DT_APP_PACKAGE_NAME; static final String ATTRIBUTE_DT_APP_PACKAGE_VERSION; static final String ATTRIBUTE_DT_APP_PACKAGE_GROUP_ID; static final String ATTRIBUTE_CLASS_PATH; static final String ATTRIBUTE_DT_APP_PACKAGE_DISPLAY_NAME; static final String ATTRIBUTE_DT_APP_PACKAGE_DESCRIPTION; }
@Test public void testAppLevelRequiredAndDefaultProperties() { List<AppPackage.AppInfo> applications = ap.getApplications(); for (AppPackage.AppInfo app : applications) { if (app.name.equals("MyFirstApplication")) { String[] rp = app.requiredProperties.toArray(new String[]{}); Assert.assertEquals("dt.test.required.2", rp[0]); Assert.assertEquals("dt.test.required.3", rp[1]); Assert.assertEquals("app-default-for-required-1", app.defaultProperties.get("dt.test.required.1").getValue()); Assert.assertEquals("app-default-for-required-1-description", app.defaultProperties.get("dt.test.required.1").getDescription()); return; } } Assert.fail("Should consist of an app called MyFirstApplication"); }