HHH-8579 corrected test case

This commit is contained in:
Brett Meyer 2013-10-22 22:29:45 -04:00
parent d3b7b9b717
commit e356b77df0
1 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import org.hibernate.hql.spi.QueryTranslator;
import org.hibernate.hql.spi.QueryTranslatorFactory;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@ -41,6 +42,8 @@ public class LocaleQueryAliasTest extends BaseCoreFunctionalTestCase {
private static final String asciiRegex = "^\\p{ASCII}*$";
private static Locale currentLocale;
@Test
public void testAliasWithLocale() {
// Without the HHH-8579 fix, this will generate non-ascii query aliases.
@ -57,10 +60,17 @@ public class LocaleQueryAliasTest extends BaseCoreFunctionalTestCase {
@BeforeClass
public static void beforeClass() {
currentLocale = Locale.getDefault();
// Turkish will generate a "dotless i" when toLowerCase is used on "I".
Locale.setDefault(Locale.forLanguageTag("tr-TR"));
}
@AfterClass
public static void afterClass() {
Locale.setDefault(currentLocale);
}
@Override
protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[] { IAmAFoo.class };