Search in sources :

Example 1 with ExecutionEnvironment

use of org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment in project aries by apache.

the class BundleRequiredExecutionEnvironmentHeaderTest method testExecutionEnvironment1.

@Test
public void testExecutionEnvironment1() {
    String name = "foo";
    ExecutionEnvironment ee = new ExecutionEnvironment(name);
    assertExecutionEnvironmentName(ee, name);
    assertExecutionEnvironmentVersion(ee, (Version) null);
}
Also used : ExecutionEnvironment(org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment) Test(org.junit.Test)

Example 2 with ExecutionEnvironment

use of org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment in project aries by apache.

the class BundleRequiredExecutionEnvironmentHeaderTest method testExecutionEnvironment2.

@Test
public void testExecutionEnvironment2() {
    String name = "bar";
    Version version = Version.parseVersion("2.0.0.qualifier");
    ExecutionEnvironment ee = new ExecutionEnvironment(name, version);
    assertExecutionEnvironmentName(ee, name);
    assertExecutionEnvironmentVersion(ee, version);
}
Also used : ExecutionEnvironment(org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment) Version(org.osgi.framework.Version) Test(org.junit.Test)

Example 3 with ExecutionEnvironment

use of org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment in project aries by apache.

the class BundleRequiredExecutionEnvironmentHeaderTest method doTestParser.

private void doTestParser(String clause, String name, Version version) {
    ExecutionEnvironment ee = null;
    try {
        ee = new Parser().parse(clause);
    } catch (Exception e) {
        fail("Unable to parse execution environment from clause " + clause);
    }
    assertExecutionEnvironmentName(ee, name);
    assertExecutionEnvironmentVersion(ee, version);
}
Also used : ExecutionEnvironment(org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment) Parser(org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment.Parser)

Aggregations

ExecutionEnvironment (org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment)3 Test (org.junit.Test)2 Parser (org.apache.aries.subsystem.core.archive.BundleRequiredExecutionEnvironmentHeader.Clause.ExecutionEnvironment.Parser)1 Version (org.osgi.framework.Version)1