Skip to content

Commit

Permalink
HHH-8579 corrected test case
Browse files Browse the repository at this point in the history
  • Loading branch information
brmeyer committed Oct 23, 2013
1 parent d3b7b9b commit e356b77
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;

Expand All @@ -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.
Expand All @@ -57,10 +60,17 @@ public void testAliasWithLocale() {

@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 };
Expand Down

0 comments on commit e356b77

Please sign in to comment.