Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.Configuration


      assertEquals(2, config.getComponentLifecyclePlugins().size());
   }

   public void testFooBarProfiles() throws Exception
   {
      Configuration config = getConfiguration("component-lifecycle-plugin.xml", "foo", "bar");
      assertEquals(3, config.getComponentLifecyclePlugins().size());
   }
View Full Code Here


    * @throws Exception
    */
   public void testWithNoPropertyDefined() throws Exception
   {
      assertNull(System.getProperty("db.configuration.path"));
      Configuration config = getConfiguration("import-with-parameter-configuration.xml");
      assertEquals(3, config.getImports().size());
      assertEquals("${db.configuration.path}/db.xml", config.getImports().get(0));
      assertEquals(System.getProperty("java.io.tmpdir") + "/bindfile.xml", config.getImports().get(1));
      assertEquals("simple.xml", config.getImports().get(2));

   }
View Full Code Here

    */
   public void testWithPropertyDefined() throws Exception
   {
      System.setProperty("db.configuration.path", "/home/admin/db");
      assertNotNull(System.getProperty("db.configuration.path"));
      Configuration config = getConfiguration("import-with-parameter-configuration.xml");
      assertEquals(3, config.getImports().size());
      assertEquals("/home/admin/db/db.xml", config.getImports().get(0));
      assertEquals(System.getProperty("java.io.tmpdir") + "/bindfile.xml", config.getImports().get(1));
      assertEquals("simple.xml", config.getImports().get(2));

   }
View Full Code Here

public class TestContainerLifecyclePluginProfile extends AbstractProfileTest
{

   public void testNoProfile() throws Exception
   {
      Configuration config = getConfiguration("container-lifecycle-plugin.xml");
      assertEquals(1, config.getContainerLifecyclePlugins().size());
   }
View Full Code Here

      assertEquals(1, config.getContainerLifecyclePlugins().size());
   }

   public void testFooProfile() throws Exception
   {
      Configuration config = getConfiguration("container-lifecycle-plugin.xml", "foo");
      assertEquals(2, config.getContainerLifecyclePlugins().size());
   }
View Full Code Here

      assertEquals(2, config.getContainerLifecyclePlugins().size());
   }

   public void testFooBarProfiles() throws Exception
   {
      Configuration config = getConfiguration("container-lifecycle-plugin.xml", "foo", "bar");
      assertEquals(3, config.getContainerLifecyclePlugins().size());
   }
View Full Code Here

public class TestComponentPluginProfile extends AbstractProfileTest
{

   public void testNoProfile() throws Exception
   {
      Configuration config = getConfiguration("component-plugin-configuration.xml");
      Component component = config.getComponent("Component");
      assertEquals(1, component.getComponentPlugins().size());
   }
View Full Code Here

      assertEquals(1, component.getComponentPlugins().size());
   }

   public void testFooProfile() throws Exception
   {
      Configuration config = getConfiguration("component-plugin-configuration.xml", "foo");
      Component component = config.getComponent("Component");
      assertEquals(2, component.getComponentPlugins().size());
   }
View Full Code Here

   public void testImport() throws Exception
   {
      // no import
      ConfigurationManager cm = new ConfigurationManagerImpl();
      cm.addConfiguration("classpath:/org/exoplatform/container/configuration/config-manager-configuration-a.xml");
      Configuration conf = cm.getConfiguration();
      assertNotNull(conf.getComponent("A"));
      assertTrue(conf.getComponent("A").getDocumentURL().getFile().endsWith("config-manager-configuration-a.xml"));
      assertNull(conf.getComponent("B"));
      assertNull(conf.getComponent("C"));
     
      // b import a
      cm = new ConfigurationManagerImpl();
      cm.addConfiguration("classpath:/org/exoplatform/container/configuration/config-manager-configuration-b.xml");
      conf = cm.getConfiguration();
      assertNotNull(conf.getComponent("A"));
      assertTrue(conf.getComponent("A").getDocumentURL().getFile().endsWith("config-manager-configuration-a.xml"));
      assertNotNull(conf.getComponent("B"));
      assertTrue(conf.getComponent("B").getDocumentURL().getFile().endsWith("config-manager-configuration-b.xml"));
      assertNull(conf.getComponent("C"));
     
      // c import b and b import a
      cm = new ConfigurationManagerImpl();
      cm.addConfiguration("classpath:/org/exoplatform/container/configuration/config-manager-configuration-c.xml");
      conf = cm.getConfiguration();
      assertNotNull(conf.getComponent("A"));
      assertTrue(conf.getComponent("A").getDocumentURL().getFile().endsWith("config-manager-configuration-a.xml"));
      assertNotNull(conf.getComponent("B"));
      assertTrue(conf.getComponent("B").getDocumentURL().getFile().endsWith("config-manager-configuration-b.xml"));
      assertNotNull(conf.getComponent("C"));
      assertTrue(conf.getComponent("C").getDocumentURL().getFile().endsWith("config-manager-configuration-c.xml"));
   }
View Full Code Here

public class TestExternalComponentPluginsProfile extends AbstractProfileTest
{

   public void testNoProfile() throws Exception
   {
      Configuration config = getConfiguration("external-component-plugins.xml");
      int size = 0;
      for (Iterator<ExternalComponentPlugins> it = config.getExternalComponentPluginsIterator();it.hasNext();)
      {
         ExternalComponentPlugins ecp = it.next();
         assertEquals(1, ecp.getComponentPlugins().size());
         size++;
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.xml.Configuration

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.