Package org.apache.aries.unittest.fixture.ArchiveFixture

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()


                            .attribute(Constants.BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
                            .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
                            .attribute(Constants.EXPORT_PACKAGE, "d.e.f").end();

    fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
    bundle.writeOut(fout);
    fout.close();
   
    ZipFixture testEba = ArchiveFixture.newZip()
     .binary("META-INF/APPLICATION.MF",
        OBRResolverTest.class.getClassLoader().getResourceAsStream("obr/APPLICATION.MF"))
View Full Code Here


        .end()
      .binary(CORE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(CORE_BUNDLE_BY_VALUE + ".jar")).end()
      .binary(TRANSITIVE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar")).end();

    fout = new FileOutputStream("blog.eba");
    testEba.writeOut(fout);
    fout.close();
  }

  @Test(expected=ResolverException.class)
  public void testBlogAppResolveFail() throws ResolverException, Exception
View Full Code Here

        .binary("org/apache/aries/sample/impl/HelloWorldImpl.class",
            OBRAppManagerTest.class.getClassLoader().getResourceAsStream("org/apache/aries/sample/impl/HelloWorldImpl.class"))
        .end();

    FileOutputStream fout = new FileOutputStream("bundle.jar");
    testBundle.writeOut(fout);
    fout.close();

    ZipFixture testEba = ArchiveFixture.newZip()
      .jar("sample.jar")
        .manifest().symbolicName("org.apache.aries.sample")
View Full Code Here

        .end()
         .binary("META-INF/APPLICATION.MF",
        OBRAppManagerTest.class.getClassLoader().getResourceAsStream("basic/APPLICATION.MF"))
        .end();
    fout = new FileOutputStream("test.eba");
    testEba.writeOut(fout);
    fout.close();
   
    StringBuilder repositoryXML = new StringBuilder();
   
    BufferedReader reader = new BufferedReader(new InputStreamReader(OBRAppManagerTest.class.getResourceAsStream("/obr/repository.xml")));
View Full Code Here

      .attribute(Constants.BUNDLE_SYMBOLICNAME, "aa" + n)
      .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
      .attribute(Constants.IMPORT_PACKAGE, "a.b.c, p.q.r, x.y.z, javax.naming")
      .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();
      FileOutputStream fout = new FileOutputStream(new File (tmpDir.getAbsoluteFile(), "aa" + n + ((n == 0)? ".jar": ".war")));
      bundle.writeOut(fout);
      fout.close();
    }
    File subDir = new File(tmpDir, "subDir");
    subDir.mkdirs();
    for (int n =0; n< 2; n++) {
View Full Code Here

      .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();



      FileOutputStream fout = new FileOutputStream(new File (subDir.getAbsoluteFile(), "aa" + n + ((n == 0)? ".jar": ".war")));
      bundle.writeOut(fout);
      fout.close();
    }

    for (int n =0; n< 2; n++) {
      ZipFixture bundle = ArchiveFixture.newJar().manifest()
View Full Code Here

      .attribute(Constants.IMPORT_PACKAGE, "a.b.c, p.q.r, x.y.z, javax.naming")
      .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();


      FileOutputStream fout = new FileOutputStream(new File (tmpDir, "bb" + n + ".jar"));
      bundle.writeOut(fout);
      fout.close();
    }

    IOUtils.writeOut(tmpDir, "simple.jar", new ByteArrayInputStream("abc".getBytes()));
    IOUtils.writeOut(tmpDir, "simple.war", new ByteArrayInputStream("sss".getBytes()));
View Full Code Here

        .binary("OSGI-INF/blueprint/sample-blueprint.xml",
            IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("isolated/sample-blueprint.xml"))
        .end();
     
    FileOutputStream fout = new FileOutputStream("test.eba");
    testEba.writeOut(fout);
    fout.close();
   
    ZipFixture testEba2 = testEba.binary("META-INF/APPLICATION.MF",
        IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("isolated/APPLICATION.MF"))
        .end();
View Full Code Here

   
    ZipFixture testEba2 = testEba.binary("META-INF/APPLICATION.MF",
        IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("isolated/APPLICATION.MF"))
        .end();
    fout = new FileOutputStream("test2.eba");
    testEba2.writeOut(fout);
    fout.close();
   
    ZipFixture sampleJar2 = ArchiveFixture.newJar()
      .manifest().symbolicName("org.apache.aries.isolated.sample")
        .attribute("Bundle-Version", "2.0.0")
View Full Code Here

      .binary("OSGI-INF/blueprint/aries.xml",
          IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("isolated/sample2-blueprint.xml"))
      .end();
 
    fout = new FileOutputStream("sample_2.0.0.jar");
    sampleJar2.writeOut(fout);
    fout.close();
   
    ZipFixture ebaWithFragment = ArchiveFixture.newZip()
      .jar("sample.jar")
        .manifest().symbolicName("org.apache.aries.isolated.sample")
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.