From aa5bcfa2ccce320ac54fb9de28278d58edaf75da Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Tue, 30 Aug 2011 23:29:09 +0800 Subject: [PATCH] HHH-6618 running hibernate functional test cases on DB matrix --- .../hibernate/test/util/StringHelperTest.java | 49 ------------------- .../hibernate/{ => test}/util/SchemaUtil.java | 0 .../{ => test}/util/SerializableThing.java | 2 +- .../util/SerializationHelperTest.java | 6 +-- .../{ => test}/util/StringHelperTest.java | 2 +- 5 files changed, 5 insertions(+), 54 deletions(-) delete mode 100644 hibernate-core/src/matrix/java/org/hibernate/test/util/StringHelperTest.java rename hibernate-core/src/test/java/org/hibernate/{ => test}/util/SchemaUtil.java (100%) rename hibernate-core/src/test/java/org/hibernate/{ => test}/util/SerializableThing.java (97%) rename hibernate-core/src/test/java/org/hibernate/{ => test}/util/SerializationHelperTest.java (96%) rename hibernate-core/src/test/java/org/hibernate/{ => test}/util/StringHelperTest.java (98%) diff --git a/hibernate-core/src/matrix/java/org/hibernate/test/util/StringHelperTest.java b/hibernate-core/src/matrix/java/org/hibernate/test/util/StringHelperTest.java deleted file mode 100644 index 507e10c584..0000000000 --- a/hibernate-core/src/matrix/java/org/hibernate/test/util/StringHelperTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * Copyright (c) 2011, Red Hat Inc. or third-party contributors as - * indicated by the @author tags or express copyright attribution - * statements applied by the authors. All third-party contributions are - * distributed under license by Red Hat Inc. - * - * This copyrighted material is made available to anyone wishing to use, modify, - * copy, or redistribute it subject to the terms and conditions of the GNU - * Lesser General Public License, as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this distribution; if not, write to: - * Free Software Foundation, Inc. - * 51 Franklin Street, Fifth Floor - * Boston, MA 02110-1301 USA - */ -package org.hibernate.test.util; - -import org.hibernate.internal.util.StringHelper; - -import org.junit.Test; - -import org.hibernate.testing.junit4.BaseUnitTestCase; - -import static org.junit.Assert.assertEquals; - -/** - * @author Steve Ebersole - */ -public class StringHelperTest extends BaseUnitTestCase { - @Test - public void testAliasGeneration() { - assertSimpleAlias( "xyz", "xyz_" ); - assertSimpleAlias( "_xyz", "xyz_" ); - assertSimpleAlias( "!xyz", "xyz_" ); - assertSimpleAlias( "abcdefghijklmnopqrstuvwxyz", "abcdefghij_" ); - } - - private void assertSimpleAlias(String source, String expected) { - assertEquals( expected, StringHelper.generateAlias( source ) ); - } -} diff --git a/hibernate-core/src/test/java/org/hibernate/util/SchemaUtil.java b/hibernate-core/src/test/java/org/hibernate/test/util/SchemaUtil.java similarity index 100% rename from hibernate-core/src/test/java/org/hibernate/util/SchemaUtil.java rename to hibernate-core/src/test/java/org/hibernate/test/util/SchemaUtil.java diff --git a/hibernate-core/src/test/java/org/hibernate/util/SerializableThing.java b/hibernate-core/src/test/java/org/hibernate/test/util/SerializableThing.java similarity index 97% rename from hibernate-core/src/test/java/org/hibernate/util/SerializableThing.java rename to hibernate-core/src/test/java/org/hibernate/test/util/SerializableThing.java index ef446503de..0eba074a2e 100644 --- a/hibernate-core/src/test/java/org/hibernate/util/SerializableThing.java +++ b/hibernate-core/src/test/java/org/hibernate/test/util/SerializableThing.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.util; +package org.hibernate.test.util; import java.io.Serializable; /** diff --git a/hibernate-core/src/test/java/org/hibernate/util/SerializationHelperTest.java b/hibernate-core/src/test/java/org/hibernate/test/util/SerializationHelperTest.java similarity index 96% rename from hibernate-core/src/test/java/org/hibernate/util/SerializationHelperTest.java rename to hibernate-core/src/test/java/org/hibernate/test/util/SerializationHelperTest.java index 4012fecf5e..8df918c426 100644 --- a/hibernate-core/src/test/java/org/hibernate/util/SerializationHelperTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/util/SerializationHelperTest.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.util; +package org.hibernate.test.util; import java.io.InputStream; import java.io.Serializable; @@ -60,7 +60,7 @@ public class SerializationHelperTest extends BaseUnitTestCase { @Test public void testSerializeDeserialize() throws Exception { - Class clazz = Thread.currentThread().getContextClassLoader().loadClass( "org.hibernate.util.SerializableThing" ); + Class clazz = Thread.currentThread().getContextClassLoader().loadClass( "org.hibernate.test.util.SerializableThing" ); Object instance = clazz.newInstance(); // SerializableType.toBytes() logic, as called from SerializableType.disassemble() @@ -105,7 +105,7 @@ public class SerializationHelperTest extends BaseUnitTestCase { if ( name.equals( "org.hibernate.LockMode" ) ) { throw new ClassNotFoundException( "Could not find "+ name ); } - if ( ! name.equals( "org.hibernate.util.SerializableThing" ) ) { + if ( ! name.equals( "org.hibernate.test.util.SerializableThing" ) ) { return getParent().loadClass( name ); } diff --git a/hibernate-core/src/test/java/org/hibernate/util/StringHelperTest.java b/hibernate-core/src/test/java/org/hibernate/test/util/StringHelperTest.java similarity index 98% rename from hibernate-core/src/test/java/org/hibernate/util/StringHelperTest.java rename to hibernate-core/src/test/java/org/hibernate/test/util/StringHelperTest.java index b872b4de6c..89f4f49f85 100644 --- a/hibernate-core/src/test/java/org/hibernate/util/StringHelperTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/util/StringHelperTest.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.util; +package org.hibernate.test.util; import org.junit.Test; import static org.junit.Assert.assertEquals;