Package org.hibernate.ejb.test.connection

Source Code of org.hibernate.ejb.test.connection.DataSourceInjectionTest

//$Id: DataSourceInjectionTest.java 9796 2006-04-26 06:46:52Z epbernard $
package org.hibernate.ejb.test.connection;

import javax.persistence.EntityManagerFactory;

import junit.framework.TestCase;
import org.hibernate.ejb.HibernatePersistence;

/**
* @author Emmanuel Bernard
*/
public class DataSourceInjectionTest extends TestCase {
  public void testDatasourceInjection() {
    PersistenceUnitInfoImpl info = new PersistenceUnitInfoImpl( new String[]{} );
    try {
      EntityManagerFactory emf = ( new HibernatePersistence() ).createContainerEntityManagerFactory( info, null );
      fail( "FakeDatasource should have been used" );
    }
    catch (FakeDataSourceException fde) {
      //success
    }
  }
}
TOP

Related Classes of org.hibernate.ejb.test.connection.DataSourceInjectionTest

TOP
Copyright © 2018 www.massapi.com. 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.