Java Code Examples for java.util.Locale#getUnicodeLocaleKeys()

The following examples show how to use java.util.Locale#getUnicodeLocaleKeys() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 2
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 3
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 4
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 5
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 6
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 7
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 8
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 9
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 10
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 11
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 12
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}
 
Example 13
public void testGetUnicodeLocaleKeys() {
    Locale locale = Locale.forLanguageTag("und-u-co-japanese-nu-thai");
    Set<String> result = locale.getUnicodeLocaleKeys();
    assertEquals("two keys", 2, result.size());
    assertTrue("co and nu", result.contains("co") && result.contains("nu"));

    // result is not modifiable
    try {
        result.add("frobozz");
        errln("expected exception when add to locale key set");
    }
    catch (UnsupportedOperationException e) {
        // ok
    }
}