[jboss-cvs] JBoss Messaging SVN: r4386 - trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 4 13:00:48 EDT 2008


Author: jmesnil
Date: 2008-06-04 13:00:47 -0400 (Wed, 04 Jun 2008)
New Revision: 4386

Added:
   trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/ClientKeepAliveHandlerTest.java
Log:
added ClientKeepAliveHandlerTest class

Added: trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/ClientKeepAliveHandlerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/ClientKeepAliveHandlerTest.java	                        (rev 0)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/remoting/ClientKeepAliveHandlerTest.java	2008-06-04 17:00:47 UTC (rev 4386)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.messaging.tests.unit.core.remoting;
+
+import static org.jboss.messaging.tests.util.RandomUtil.randomLong;
+import junit.framework.TestCase;
+
+import org.jboss.messaging.core.remoting.impl.ClientKeepAliveHandler;
+import org.jboss.messaging.core.remoting.impl.wireformat.Ping;
+import org.jboss.messaging.core.remoting.impl.wireformat.Pong;
+
+/**
+ * @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
+ *
+ * @version <tt>$Revision$</tt>
+ *
+ */
+public class ClientKeepAliveHandlerTest extends TestCase
+{
+   // Constants -----------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
+   // Public --------------------------------------------------------
+
+   public void testPing() throws Exception
+   {
+      ClientKeepAliveHandler handler = new ClientKeepAliveHandler();
+
+      Ping ping = new Ping(randomLong());
+      Pong pong = handler.ping(ping);
+      
+      assertEquals(ping.getSessionID(), pong.getSessionID());
+      assertEquals(ping.getResponseTargetID(), pong.getTargetID());
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+}




More information about the jboss-cvs-commits mailing list