Package org.jboss.test.proxyfactory.support

Examples of org.jboss.test.proxyfactory.support.TestManagedConnectionFactory


*/
public class SerializableTestCase extends AbstractProxyTest
{
   public void testSerializable() throws Exception
   {
      Serializable object = (Serializable) assertCreateProxy(new TestManagedConnectionFactory(), Serializable.class);
      byte[] bytes = serialize(object);
      Object result = deserialize(bytes);
      assertNotNull(result);
      assertTrue(result instanceof TestManagedConnectionFactory);
      TestManagedConnectionFactory mcf = (TestManagedConnectionFactory) result;
      TestConnectionManager cm = new TestConnectionManager();
      Object cf = mcf.createConnectionFactory(cm);
      assertTrue(cm == cf);
      Method method = SimpleInterceptor.invoked;
      assertNotNull(method);
      assertEquals("createConnectionFactory", method.getName());
   }
View Full Code Here


public class DataSourceTestCase extends AbstractProxyTest
{
   public void testConnectionManager() throws Exception
   {
      ConnectionManager cm = new TestConnectionManager();
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      SimpleMetaData metadata = new SimpleMetaData();
     
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_FACTORY, ConnectionFactoryInterceptor.CONNECTION_MANAGER, cm);
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_MANAGER, ConnectionFactoryInterceptor.MANAGED_CONNECTION_FACTORY, mcf);
      DataSource ds = (DataSource) assertCreateHollowProxy(new Class[] { DataSource.class }, metadata, DataSource.class);
View Full Code Here

public class DataSourceTestCase extends AbstractProxyTest
{
   public void testConnectionManager() throws Exception
   {
      ConnectionManager cm = new TestConnectionManager();
      ManagedConnectionFactory mcf = new TestManagedConnectionFactory();
      SimpleMetaData metadata = new SimpleMetaData();
     
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_FACTORY, ConnectionFactoryInterceptor.CONNECTION_MANAGER, cm);
      metadata.addMetaData(ConnectionFactoryInterceptor.CONNECTION_MANAGER, ConnectionFactoryInterceptor.MANAGED_CONNECTION_FACTORY, mcf);
      DataSource ds = (DataSource) assertCreateHollowProxy(new Class[] { DataSource.class }, metadata, DataSource.class);
View Full Code Here

*/
public class SerializableTestCase extends AbstractProxyTest
{
   public void testSerializable() throws Exception
   {
      Serializable object = (Serializable) assertCreateProxy(new TestManagedConnectionFactory(), Serializable.class);
      byte[] bytes = serialize(object);
      Object result = deserialize(bytes);
      assertNotNull(result);
      assertTrue(result instanceof TestManagedConnectionFactory);
      TestManagedConnectionFactory mcf = (TestManagedConnectionFactory) result;
      TestConnectionManager cm = new TestConnectionManager();
      Object cf = mcf.createConnectionFactory(cm);
      assertTrue(cm == cf);
      Method method = SimpleInterceptor.invoked;
      assertNotNull(method);
      assertEquals("createConnectionFactory", method.getName());
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.proxyfactory.support.TestManagedConnectionFactory

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.