Package org.jboss.ejb3.endpoint.reflect

Examples of org.jboss.ejb3.endpoint.reflect.EndpointInvocationHandler


   public void testEqualsDummyObject() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      assertFalse(handler.equals(new Object()));
   }
View Full Code Here


   public void testEqualsNull() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      EndpointInvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      assertFalse(handler.equals(null));
   }
View Full Code Here

   {
      Endpoint endpoint1 = new SimpleEndpoint();
      Endpoint endpoint2 = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint1, session, businessInterface);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint2, session, businessInterface);
      assertFalse(handler1.equals(handler2));
   }
View Full Code Here

   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session1 = UUID.randomUUID();
      Serializable session2 = session1;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint, session1, businessInterface);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint, session2, businessInterface);
      assertTrue(handler1.equals(handler2));
   }
View Full Code Here

   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session1 = UUID.randomUUID();
      Serializable session2 = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint, session1, businessInterface);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint, session2, businessInterface);
      assertFalse(handler1.equals(handler2));
   }
View Full Code Here

   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session1 = null;
      Serializable session2 = UUID.randomUUID();
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler1 = new EndpointInvocationHandler(endpoint, session1, businessInterface);
      InvocationHandler handler2 = new EndpointInvocationHandler(endpoint, session2, businessInterface);
      assertFalse(handler1.equals(handler2));
   }
View Full Code Here

   public void testHashCode() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      int result = handler.hashCode();
      assertEquals(createHashCode(endpoint, session, businessInterface), result);
   }
View Full Code Here

   public void testHashCodeOnInvoke() throws Throwable
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      Object proxy = null;
      Method method = Object.class.getDeclaredMethod("hashCode");
      Object args[] = null;
      int result = (Integer) handler.invoke(proxy, method, args);
      assertEquals(createHashCode(endpoint, session, businessInterface), result);
   }
View Full Code Here

   public void testHashCodeWithBusinessInterface() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = null;
      Class<SimpleInterface> businessInterface = SimpleInterface.class;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      int result = handler.hashCode();
      assertEquals(createHashCode(endpoint, session, businessInterface), result);
      assertFalse(createHashCode(endpoint, session, null) == result);
   }
View Full Code Here

   public void testHashCodeWithSession() throws Exception
   {
      Endpoint endpoint = new SimpleEndpoint();
      Serializable session = UUID.randomUUID();
      Class<SimpleInterface> businessInterface = null;
      InvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      int result = handler.hashCode();
      assertEquals(createHashCode(endpoint, session, businessInterface), result);
      assertFalse(createHashCode(endpoint, null, businessInterface) == result);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.endpoint.reflect.EndpointInvocationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.