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

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


        .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("demo.eba");
    testEba.writeOut(fout);
    fout.close();
   

    //create the bundle
    bundle = ArchiveFixture.newJar()
View Full Code Here


    //Create a helloworld eba with the client included
    ZipFixture multiServiceHelloEba = ArchiveFixture.newZip()
     .binary(HELLO_WORLD_CLIENT_BUNDLE + ".jar", new FileInputStream(HELLO_WORLD_CLIENT_BUNDLE + ".jar")).end();
    
   fout = new FileOutputStream("hello.eba");
   multiServiceHelloEba.writeOut(fout);
   fout.close();

  }

  @Test(expected=ResolverException.class)
View Full Code Here

    .attribute(Constants.BUNDLE_SYMBOLICNAME, fake_app_management)
    .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
    .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();

    OutputStream out = new FileOutputStream(fake_app_management + ".jar");
    bundle.writeOut(out);
    out.close();


    ZipFixture testEba = ArchiveFixture.newZip()
    .jar("org.apache.aries.application.itests.minimports.jar")
View Full Code Here

        .binary("OSGI-INF/blueprint/app-mgr-client.xml",
            MinimumImportsTest.class.getClassLoader().getResourceAsStream("app-mgr-client.xml"))
            .end();

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

    StringBuilder repositoryXML = new StringBuilder();

    BufferedReader reader = new BufferedReader(new InputStreamReader(MinimumImportsTest.class.getResourceAsStream("/basic/fakeAppMgrServiceRepo.xml")));
View Full Code Here

        .binary("OSGI-INF/blueprint/aries.xml",
            UpdateAppTest.class.getClassLoader().getResourceAsStream("isolated/sample-blueprint.xml"))
        .end();
     
    FileOutputStream fout = new FileOutputStream("test.eba");
    testEba.writeOut(fout);
    fout.close();
   
    ZipFixture sample2 = 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");
    sample2.writeOut(fout);
    fout.close();
   
    createdApplications = true;
  }
 
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.IMPORT_PACKAGE, "p.q.r, x.y.z, javax.naming, " + BUNDLE_IN_FRAMEWORK)
                            .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();

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

    bundle = ArchiveFixture.newJar().manifest()
                            .attribute(Constants.BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_VALUE)
                            .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
View Full Code Here

                            .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
                            .attribute(Constants.EXPORT_PACKAGE, "p.q.r")
                            .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();

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

    bundle = ArchiveFixture.newJar().manifest()
                            .attribute(Constants.BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_REFERENCE)
                            .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
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.