commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r321339 - /jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java
Date Sat, 15 Oct 2005 14:26:18 GMT
Author: jcarman
Date: Sat Oct 15 07:26:15 2005
New Revision: 321339

URL: http://svn.apache.org/viewcvs?rev=321339&view=rev
Log:
Added test case to test for when reflection proxy factory is not suitable (should never happen
with 1.3+ JVMs).

Modified:
    jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java

Modified: jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java?rev=321339&r1=321338&r2=321339&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/test/org/apache/commons/proxy/TestProxyUtils.java
Sat Oct 15 07:26:15 2005
@@ -20,6 +20,7 @@
 import org.apache.commons.proxy.factory.javassist.JavassistProxyFactory;
 import org.apache.commons.proxy.factory.reflect.ReflectionProxyFactory;
 import org.apache.commons.proxy.util.Echo;
+import org.apache.commons.proxy.exception.ProxyFactoryException;
 
 public class TestProxyUtils extends TestCase
 {
@@ -66,6 +67,16 @@
         assertTrue( ProxyUtils.getProxyFactory( cl ) instanceof CglibProxyFactory );
         cl = new IsolatingClassLoader( CglibProxyFactory.class, cl );
         assertTrue( ProxyUtils.getProxyFactory( cl ) instanceof ReflectionProxyFactory );
+        cl = new IsolatingClassLoader( ReflectionProxyFactory.class, cl );
+        try
+        {
+            ProxyUtils.getProxyFactory( cl );
+            fail();
+        }
+        catch( ProxyFactoryException e )
+        {
+
+        }
     }
 
     private static class IsolatingClassLoader extends ClassLoader



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message