18 package testsuite.clusterj;
20 import com.mysql.clusterj.ClusterJFatalUserException;
21 import com.mysql.clusterj.ClusterJHelper;
22 import com.mysql.clusterj.core.store.ClusterConnectionService;
25 public void testBadClassName() {
28 fail(
"Expected ClassNotFoundException, got no exception");
31 Throwable cause = e.getCause();
32 if (!(cause instanceof ClassNotFoundException)) {
33 fail(
"Expected ClassNotFoundException, got " + cause.getClass() +
" message: " + e.getMessage());
38 public void testClassNotClusterConnectionService() {
41 fail(
"Expected ClassCastException, got no exception");
44 Throwable cause = e.getCause();
45 if (!(cause instanceof ClassCastException)) {
46 fail(
"Expected ClassCastException, got " + cause.getClass() +
" message: " + e.getMessage());
51 public void testNotPublicConstructorClusterConnectionService() {
54 fail(
"Expected IllegalAccessException, got no exception");
57 Throwable cause = e.getCause();
58 if (!(cause instanceof IllegalAccessException)) {
59 fail(
"Expected IllegalAccessException, got " + cause.getClass() +
" message: " + e.getMessage());