Examples of DeployedBundles


Examples of org.apache.aries.application.modelling.DeployedBundles

  @Test
  public void testGetProvisionBundle_Valid() throws Exception
  {
    // Check the provision bundle entry is correct.
    DeployedBundles deployedBundles = validDeployedBundles();
    packagesResolve(deployedBundles);
    String provisionBundleEntry = deployedBundles.getProvisionBundle();
    String expectedResult = "bundle.e;deployed-version=1.0.0";
    Assert.assertTrue("ProvisionBundle=" + provisionBundleEntry, isEqual(provisionBundleEntry, expectedResult));
  }
View Full Code Here

Examples of org.apache.aries.application.modelling.DeployedBundles

  {
    // Check the import package entry is correct.
    String importPackageEntry = null;
    try
    {
      DeployedBundles deployedBundles = validDeployedBundles();
      packagesResolve(deployedBundles);
     
      importPackageEntry = deployedBundles.getImportPackage();
    }
    catch (ResolverException e)
    {
      e.printStackTrace();
      Assert.fail(e.toString());
View Full Code Here

Examples of org.apache.aries.application.modelling.DeployedBundles

  }
 
  @Test
  public void testGetImportPackage_ValidDuplicates() throws Exception
  {
    DeployedBundles deployedBundles = getSimpleDeployedBundles(ternary.CONTENT, ternary.CONTENT, ternary.CONTENT);
   
    deployedBundles.addBundle(createModelledResource("bundle.a", "1.0.0",
        Arrays.asList("package.d;version=\"[1.0.0,3.0.0)\""), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.b", "1.0.0",
        Arrays.asList("package.d;version=\"2.0.0\""), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.c", "1.0.0",
        Arrays.asList("package.d;version=\"1.0.0\""), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.d", "1.0.0",
        new ArrayList<String>(), Arrays.asList("package.d;version=2.0.1")));
   
    // Check that package D is not duplicated in Import-Package, and that the version range
    // has been narrowed to the intersection of the original requirements.
    String importPackageEntry = null;
    try
    {
      importPackageEntry = deployedBundles.getImportPackage();
    }
    catch (ResolverException e)
    {
      e.printStackTrace();
      Assert.fail(e.toString());
View Full Code Here

Examples of org.apache.aries.application.modelling.DeployedBundles

  }

  @Test
  public void testGetImportPackage_ValidDuplicatesWithAttributes() throws Exception
  {
    DeployedBundles deployedBundles = getSimpleDeployedBundles(ternary.CONTENT, ternary.CONTENT, ternary.NONE);
   
    deployedBundles.addBundle(createModelledResource("bundle.a", "1.0.0",
        Arrays.asList("package.c;version=1.0.0;was_internal=true"), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.b", "1.0.0",
        Arrays.asList("package.c;version=2.0.0;was_internal=true"), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.c", "1.0.0",
        new ArrayList<String>(), Arrays.asList("package.c;version=2.0.0;was_internal=true")));

    // Check that package C is not duplicated in Import-Package, and that the version range
    // has been narrowed to the intersection of the original requirements.
    String importPackageEntry = null;
    try
    {
      importPackageEntry = deployedBundles.getImportPackage();
    }
    catch (ResolverException e)
    {
      e.printStackTrace();
      Assert.fail(e.toString());
View Full Code Here

Examples of org.apache.aries.application.modelling.DeployedBundles

  }

  @Test
  public void testGetImportPackage_InvalidDuplicates() throws Exception
  {
    DeployedBundles deployedBundles = getSimpleDeployedBundles(ternary.CONTENT, ternary.CONTENT, ternary.NONE);
   
    deployedBundles.addBundle(createModelledResource("bundle.a", "1.0.0",
        Arrays.asList("package.c;version=\"[1.0.0,2.0.0)\""), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.b", "1.0.0",
        Arrays.asList("package.c;version=2.0.0"), new ArrayList<String>()));
    deployedBundles.addBundle(createModelledResource("bundle.c", "1.0.0",
        new ArrayList<String>(), Arrays.asList("package.c;version=2.0.0;was_internal=true")));
   
    // Check that the incompatible version requirements cannot be resolved.
    String importPackageEntry = null;
    try
    {
      importPackageEntry = deployedBundles.getImportPackage();
      Assert.fail("Expected exception. ImportPackage=" + importPackageEntry);
    }
    catch (ResolverException e)
    {
      // We expect to reach this point if the test passes.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.