[jboss-remoting-commits] JBoss Remoting SVN: r4744 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting: connection and 1 other directory.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Nov 29 01:54:44 EST 2008


Author: ron.sigal at jboss.com
Date: 2008-11-29 01:54:44 -0500 (Sat, 29 Nov 2008)
New Revision: 4744

Added:
   remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorTestCase.java
Removed:
   remoting2/branches/2.2/src/tests/org/jboss/test/remoting/ConnectionValidatorTest.java
Log:
JBREM-1055, JBREM-1070: Renamed ConnectionValidatorTest to ConnectionValidatorTestCase and moved to org.jboss.test.remoting.connection.

Deleted: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/ConnectionValidatorTest.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/ConnectionValidatorTest.java	2008-11-29 06:52:26 UTC (rev 4743)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/ConnectionValidatorTest.java	2008-11-29 06:54:44 UTC (rev 4744)
@@ -1,78 +0,0 @@
-package org.jboss.test.remoting;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.jboss.remoting.Client;
-import org.jboss.remoting.ConnectionFailedException;
-import org.jboss.remoting.ConnectionValidator;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.MicroRemoteClientInvoker;
-import org.jboss.remoting.marshal.Marshaller;
-import org.jboss.remoting.marshal.UnMarshaller;
-import org.jboss.remoting.transport.ClientInvoker;
-
-public class ConnectionValidatorTest extends TestCase
-{
-
-   public void testShouldDisallowDirectRun()
-   {
-      ConnectionValidator cv = new ConnectionValidator(new Client() {
-         public Map getConfiguration()
-         {
-            return null;
-         }
-
-         public ClientInvoker getInvoker()
-         {
-            try
-            {
-               return new MicroRemoteClientInvoker(
-                     new InvokerLocator("http://dummy:65535/dummy/")) {
-
-                  public String getSessionId()
-                  {
-                     return "dummyId";
-                  }
-
-                  protected String getDefaultDataType()
-                  {
-                     throw new UnsupportedOperationException();
-                  }
-
-                  protected void handleConnect() throws ConnectionFailedException
-                  {
-                     throw new UnsupportedOperationException();
-                  }
-
-                  protected void handleDisconnect()
-                  {
-                     throw new UnsupportedOperationException();
-                  }
-
-                  protected Object transport(String sessionId, Object invocation, Map metadata, Marshaller marshaller,
-                        UnMarshaller unmarshaller) throws IOException, ConnectionFailedException, ClassNotFoundException
-                  {
-                     throw new UnsupportedOperationException();
-                  }
-               };
-            }
-            catch (MalformedURLException e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-      });
-
-      try
-      {
-         cv.run();
-         fail("Should throw IllegalStateException");
-      } catch (IllegalStateException e) {
-         // Expected
-      }
-   }
-}

Copied: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorTestCase.java (from rev 4674, remoting2/branches/2.2/src/tests/org/jboss/test/remoting/ConnectionValidatorTest.java)
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorTestCase.java	                        (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorTestCase.java	2008-11-29 06:54:44 UTC (rev 4744)
@@ -0,0 +1,78 @@
+package org.jboss.test.remoting.connection;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.jboss.remoting.Client;
+import org.jboss.remoting.ConnectionFailedException;
+import org.jboss.remoting.ConnectionValidator;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.MicroRemoteClientInvoker;
+import org.jboss.remoting.marshal.Marshaller;
+import org.jboss.remoting.marshal.UnMarshaller;
+import org.jboss.remoting.transport.ClientInvoker;
+
+public class ConnectionValidatorTestCase extends TestCase
+{
+
+   public void testShouldDisallowDirectRun()
+   {
+      ConnectionValidator cv = new ConnectionValidator(new Client() {
+         public Map getConfiguration()
+         {
+            return null;
+         }
+
+         public ClientInvoker getInvoker()
+         {
+            try
+            {
+               return new MicroRemoteClientInvoker(
+                     new InvokerLocator("http://dummy:65535/dummy/")) {
+
+                  public String getSessionId()
+                  {
+                     return "dummyId";
+                  }
+
+                  protected String getDefaultDataType()
+                  {
+                     throw new UnsupportedOperationException();
+                  }
+
+                  protected void handleConnect() throws ConnectionFailedException
+                  {
+                     throw new UnsupportedOperationException();
+                  }
+
+                  protected void handleDisconnect()
+                  {
+                     throw new UnsupportedOperationException();
+                  }
+
+                  protected Object transport(String sessionId, Object invocation, Map metadata, Marshaller marshaller,
+                        UnMarshaller unmarshaller) throws IOException, ConnectionFailedException, ClassNotFoundException
+                  {
+                     throw new UnsupportedOperationException();
+                  }
+               };
+            }
+            catch (MalformedURLException e)
+            {
+               throw new RuntimeException(e);
+            }
+         }
+      });
+
+      try
+      {
+         cv.run();
+         fail("Should throw IllegalStateException");
+      } catch (IllegalStateException e) {
+         // Expected
+      }
+   }
+}


Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + native




More information about the jboss-remoting-commits mailing list