felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1326382 - /felix/trunk/ipojo/core/src/test/java/org/apache/felix/ipojo/handlers/dependency/SmartProxyTest.java
Date Sun, 15 Apr 2012 17:21:00 GMT
Author: clement
Date: Sun Apr 15 17:21:00 2012
New Revision: 1326382

URL: http://svn.apache.org/viewvc?rev=1326382&view=rev
Log:
Update test to work in headless mode.

Modified:
    felix/trunk/ipojo/core/src/test/java/org/apache/felix/ipojo/handlers/dependency/SmartProxyTest.java

Modified: felix/trunk/ipojo/core/src/test/java/org/apache/felix/ipojo/handlers/dependency/SmartProxyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/test/java/org/apache/felix/ipojo/handlers/dependency/SmartProxyTest.java?rev=1326382&r1=1326381&r2=1326382&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/test/java/org/apache/felix/ipojo/handlers/dependency/SmartProxyTest.java
(original)
+++ felix/trunk/ipojo/core/src/test/java/org/apache/felix/ipojo/handlers/dependency/SmartProxyTest.java
Sun Apr 15 17:21:00 2012
@@ -1,10 +1,8 @@
 package org.apache.felix.ipojo.handlers.dependency;
 
-import java.awt.Window;
+import java.util.ArrayList;
 import java.util.List;
 
-import javax.swing.Action;
-
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
@@ -47,8 +45,7 @@ public class SmartProxyTest extends Test
 
         Mockito.when(handler.getLogger()).thenReturn(logger);
 
-        // Try with java.List
-        Dependency dependency = new Dependency(handler, "a_field", Window.class, null, false,
false, false,
+        Dependency dependency = new Dependency(handler, "a_field", ArrayList.class, null,
false, false, false,
                 true, "dep", context, Dependency.DYNAMIC_BINDING_POLICY, null, null);
         dependency.start();
 
@@ -57,7 +54,7 @@ public class SmartProxyTest extends Test
 
         dependency.stop();
 
-        // Try with javax.swing.Action
+        // Try with an Object.
         dependency = new Dependency(handler, "a_field", Object.class, null, false, false,
false,
                 true, "dep", context, Dependency.DYNAMIC_BINDING_POLICY, null, null);
         dependency.start();
@@ -106,13 +103,13 @@ public class SmartProxyTest extends Test
 
         dependency.stop();
 
-        // Try with javax.swing.Action
-        dependency = new Dependency(handler, "a_field", Action.class, null, false, false,
false,
+        // Try with javax.sql.CommonDataSource
+        dependency = new Dependency(handler, "a_field", javax.sql.CommonDataSource.class,
null, false, false, false,
                 true, "dep", context, Dependency.DYNAMIC_BINDING_POLICY, null, null);
         dependency.start();
         // OK
         Assert.assertNotNull(dependency.onGet(new Object(), "a_field", null));
-        Assert.assertTrue(dependency.onGet(new Object(), "a_field", null) instanceof Action);
+        Assert.assertTrue(dependency.onGet(new Object(), "a_field", null) instanceof javax.sql.CommonDataSource);
     }
 
 }



Mime
View raw message