aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1410602 - in /aries/trunk/blueprint: blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
Date Fri, 16 Nov 2012 22:28:38 GMT
Author: dkulp
Date: Fri Nov 16 22:28:37 2012
New Revision: 1410602

URL: http://svn.apache.org/viewvc?rev=1410602&view=rev
Log:
Add a test

Modified:
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
    aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java?rev=1410602&r1=1410601&r2=1410602&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
(original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
Fri Nov 16 22:28:37 2012
@@ -35,6 +35,7 @@ import org.apache.aries.blueprint.testbu
 import org.apache.aries.blueprint.testbundlea.NSHandlerTwo;
 import org.apache.aries.blueprint.testbundlea.ProcessableBean;
 import org.apache.aries.blueprint.testbundlea.ProcessableBean.Phase;
+import org.apache.aries.blueprint.testbundleb.OtherBean;
 import org.apache.aries.blueprint.testbundleb.TestBean;
 import org.apache.aries.itest.AbstractIntegrationTest;
 import org.junit.Test;
@@ -189,6 +190,11 @@ public class ASMMultiBundleTest extends 
         //destroy invocation will only occur at tear down.. TODO, how to test after teardown.
         //assertEquals(pb.getProcessedBy(Phase.BEFORE_DESTROY).get(0),bp);
         //assertEquals(pb.getProcessedBy(Phase.AFTER_DESTROY).get(0),bp);
+        
+        
+        Object objOther = beanContainer.getComponentInstance("PlaceHolerTestBean");
+        assertTrue(objOther instanceof OtherBean);
+        assertEquals("test1value", ((OtherBean)objOther).getTestValue());
     }
     
     @org.ops4j.pax.exam.junit.Configuration

Modified: aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml?rev=1410602&r1=1410601&r2=1410602&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
(original)
+++ aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
Fri Nov 16 22:28:37 2012
@@ -17,7 +17,7 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
+           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
            xmlns:one="http://ns.handler.one"
            xmlns:two="http://ns.handler.two"
            xmlns:three="http://ns.handler.three"
@@ -30,6 +30,29 @@
            xmlns:seven="http://ns.handler.seven"
            default-availability="optional">
 
+    <ext:property-placeholder placeholder-prefix="$(" placeholder-suffix=")">
+        <ext:default-properties>
+            <ext:property name="test1" value="test1value"/>
+        </ext:default-properties>
+    </ext:property-placeholder>
+    
+
+    <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]" ignore-missing-locations="true">
+        <ext:default-properties>
+            <ext:property name="test2" value="$(test1)"/>
+        </ext:default-properties>
+    </ext:property-placeholder>
+
+    <ext:property-placeholder placeholder-prefix="${" placeholder-suffix="}" ignore-missing-locations="true">
+        <ext:default-properties>
+            <ext:property name="test3" value="$[test2]"/>
+        </ext:default-properties>
+    </ext:property-placeholder>
+    
+  <bean id="PlaceHolerTestBean" class="org.apache.aries.blueprint.testbundleb.OtherBean"
init-method="init">
+     <property name="testValue" value="${test3}"/>
+  </bean>    
+    
   <!-- Default test.. no other ns interaction. -->
   <bean id="TestBeanA" class="org.apache.aries.blueprint.testbundleb.TestBean" scope="singleton">
      <property name="red" value="RED"/>
@@ -58,7 +81,7 @@
   </bean>
   
   <!--  drives a method on intercepted TestBeanC expects false as response -->
-    <bean id="OtherBeanB" class="org.apache.aries.blueprint.testbundleb.OtherBean" init-method="init">
+  <bean id="OtherBeanB" class="org.apache.aries.blueprint.testbundleb.OtherBean" init-method="init">
      <property name="testBean" ref="TestBeanC" />
      <property name="testValue" value="BLUE"/>
   </bean>



Mime
View raw message