/** * Creates a {@link SystemPropertyOption}. * * @param key * system property key * * @return framework property option */ public static SystemPropertyOption systemProperty(final String key) { return new SystemPropertyOption(key); }
/** * Creates a {@link SystemPropertyOption}. * * @param key * system property key * * @return framework property option */ public static SystemPropertyOption systemProperty(final String key) { return new SystemPropertyOption(key); }
private ExamSystem createExamSystem() throws IOException { systemType = cm.getProperty(EXAM_SYSTEM_KEY, EXAM_SYSTEM_TEST); String timeout = cm.getProperty(EXAM_SERVICE_TIMEOUT_KEY, EXAM_SERVICE_TIMEOUT_DEFAULT); Option timeoutOption = new SystemPropertyOption(EXAM_SERVICE_TIMEOUT_KEY).value(timeout); if (EXAM_SYSTEM_DEFAULT.equals(systemType)) { system = DefaultExamSystem.create(new Option[] { timeoutOption }); } else if (EXAM_SYSTEM_JAVAEE.equals(systemType)) { WarProbeOption warProbe = new WarProbeOption().classPathDefaultExcludes(); system = DefaultExamSystem.create(new Option[] { warProbe }); } else { system = PaxExamRuntime.createTestSystem(timeoutOption); } return system; }
@Configuration public Option[] configuration() throws IOException, URISyntaxException { return CoreOptions.options( junitBundles(), mavenBundle("org.apache.felix", "org.apache.felix.scr", "2.0.12"), mavenBundle("org.osgi", "org.osgi.dto", "1.0.0"), mavenBundle( "org.apache.felix", "org.apache.felix.configadmin", "1.8.16" ), mavenBundle( "org.apache.felix", "org.apache.felix.fileinstall", "3.2.6" ), mavenBundle( "org.ops4j.pax.logging", "pax-logging-api", "1.7.2" ), frameworkProperty("repository.home").value("target"), systemProperties(new SystemPropertyOption("felix.fileinstall.dir").value(getConfigDir())), jarBundles(), jpmsOptions()); }