Package org.apache.aries.application.impl

Examples of org.apache.aries.application.impl.ApplicationMetadataFactoryImpl


  DummyConverter _converter;
  DummyDMManager _dmMgr;
  @Before
  public void setup() {
    _appMgr = new AriesApplicationManagerImpl ();
    _appMetaFactory = new ApplicationMetadataFactoryImpl ();

    DeploymentMetadataFactory dmf = new DeploymentMetadataFactoryImpl();
    _converter = new DummyConverter();
    List<BundleConverter> bundleConverters = new ArrayList<BundleConverter>();
    bundleConverters.add(_converter);
View Full Code Here


   * Check metadata can be extracted from a simple manifest.
   */
  @Test
  public void testManifestMetadata() throws Exception
  {
    ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
    InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION.MF");   
    ApplicationMetadata am = manager.parseApplicationMetadata(in);
    assertNotNull(am);

    assertEquals(am.getApplicationName(),appName);

    //"com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business",
View Full Code Here

   * for a single manifest attribute.
   */
  @Test
  public void testManifestMetadataWithMultiLineEntries() throws Exception
  {
    ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
   
    InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION2.MF");
   
    ApplicationMetadata am = manager.parseApplicationMetadata(in);
    assertNotNull(am);

    assertEquals(am.getApplicationName(),appName);

    //"com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business",
View Full Code Here

  }
 
  @Test
  public void testManifestWithoutEndingInNewLine() throws Exception
  {
    ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
   
    InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION3.MF");
   
    ApplicationMetadata am = manager.parseApplicationMetadata(in);
    assertNotNull(am);

    assertEquals("Wrong number of bundles are in the application", 1, am.getApplicationContents().size());
    assertEquals("Wrong bundle name", "org.apache.aries.applications.test.bundle", am.getApplicationContents().get(0).getContentName());
  }
View Full Code Here

public class ApplicationMetadataImplTest
{
  @Test
  public void testBasicMetadataCreation() throws IOException
  {
    ApplicationMetadataFactory manager = new ApplicationMetadataFactoryImpl();
    ApplicationMetadata app = manager.parseApplicationMetadata(getClass().getResourceAsStream("/META-INF/APPLICATION.MF"));
   
    Assert.assertEquals("Travel Reservation", app.getApplicationName());
  }
View Full Code Here

    Assert.assertEquals("Travel Reservation", app.getApplicationName());
  }
  @Test
  public void testMetadataCreation() throws Exception
  {
    ApplicationMetadataFactory manager = new ApplicationMetadataFactoryImpl();
    ApplicationMetadata app = manager.parseApplicationMetadata(getClass().getResourceAsStream("/META-INF/APPLICATION4.MF"));
    assertEquals("Travel Reservation", app.getApplicationName());
    assertEquals("com.travel.reservation", app.getApplicationSymbolicName());
    assertEquals(Version.parseVersion("1.2.0"), app.getApplicationVersion());
    List<Content> appContents = app.getApplicationContents();
    assertEquals(2, appContents.size());
View Full Code Here

  DummyResolver _resolver;
 
  @Before
  public void setup() {
    _appMgr = new AriesApplicationManagerImpl ();
    _appMetaFactory = new ApplicationMetadataFactoryImpl ();

    DeploymentMetadataFactory dmf = new DeploymentMetadataFactoryImpl();
    List<BundleConverter> bundleConverters = new ArrayList<BundleConverter>();
    _resolver = new DummyResolver();
   
View Full Code Here

   * Check metadata can be extracted from a simple manifest.
   */
  @Test
  public void testManifestMetadata() throws Exception
  {
    ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
    InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION.MF");   
    ApplicationMetadata am = manager.parseApplicationMetadata(in);
    assertNotNull(am);

    assertEquals(am.getApplicationName(),appName);

    //"com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business",
View Full Code Here

   * for a single manifest attribute.
   */
  @Test
  public void testManifestMetadataWithMultiLineEntries() throws Exception
  {
    ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
   
    InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION2.MF");
   
    ApplicationMetadata am = manager.parseApplicationMetadata(in);
    assertNotNull(am);

    assertEquals(am.getApplicationName(),appName);

    //"com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business",
View Full Code Here

  }
 
  @Test
  public void testManifestWithoutEndingInNewLine() throws Exception
  {
    ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
   
    InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION3.MF");
   
    ApplicationMetadata am = manager.parseApplicationMetadata(in);
    assertNotNull(am);

    assertEquals("Wrong number of bundles are in the application", 1, am.getApplicationContents().size());
    assertEquals("Wrong bundle name", "org.apache.aries.applications.test.bundle", am.getApplicationContents().get(0).getContentName());
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.application.impl.ApplicationMetadataFactoryImpl

Copyright © 2018 www.massapicom. 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.