aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r941884 - /incubator/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
Date Thu, 06 May 2010 19:53:23 GMT
Author: linsun
Date: Thu May  6 19:53:23 2010
New Revision: 941884

URL: http://svn.apache.org/viewvc?rev=941884&view=rev
Log:
add some testing for the account beans

Modified:
    incubator/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java

Modified: incubator/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java?rev=941884&r1=941883&r2=941884&view=diff
==============================================================================
--- incubator/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
(original)
+++ incubator/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/AbstractIntegrationTest.java
Thu May  6 19:53:23 2010
@@ -34,6 +34,8 @@ import java.util.Currency;
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.aries.blueprint.sample.Account;
+import org.apache.aries.blueprint.sample.AccountFactory;
 import org.apache.aries.blueprint.sample.Bar;
 import org.apache.aries.blueprint.sample.Foo;
 import org.junit.After;
@@ -258,7 +260,27 @@ public abstract class AbstractIntegratio
         obj = getOsgiService(bc == null ? bundleContext : bc, Foo.class, null, 5000);
         assertNotNull(obj);
         assertSame(foo, obj);
-
+        
+        obj = blueprintContainer.getComponentInstance("accountOne");
+        assertNotNull(obj);
+        Account account = (Account)obj;
+        assertEquals(1, account.getAccountNumber());
+     
+        obj = blueprintContainer.getComponentInstance("accountTwo");
+        assertNotNull(obj);
+        account = (Account)obj;
+        assertEquals(2, account.getAccountNumber());
+        
+        obj = blueprintContainer.getComponentInstance("accountThree");
+        assertNotNull(obj);
+        account = (Account)obj;
+        assertEquals(3, account.getAccountNumber());
+        
+        obj = blueprintContainer.getComponentInstance("accountFactory");
+        assertNotNull(obj);
+        AccountFactory accountFactory = (AccountFactory)obj;
+        assertEquals("account factory", accountFactory.getFactoryName());
+        
         bundle.stop();
 
         Thread.sleep(1000);



Mime
View raw message