19 package com.mysql.clusterj.openjpatest;
21 import javax.persistence.EntityManagerFactory;
22 import javax.persistence.Persistence;
24 import junit.framework.TestCase;
31 protected String getPersistenceUnitName() {
32 return "BadPUNoConnectString";
36 EntityManagerFactory emf = Persistence.createEntityManagerFactory(
37 getPersistenceUnitName());
38 emf.createEntityManager();
39 assertNull(
"Unexpected emf for null connectString", emf);
40 }
catch (RuntimeException ex) {
42 if (!(ex.getMessage().contains(
"connectString"))) {
43 fail(
"Wrong exception thrown. " +
44 "Expected Exception with connectString; got " +