final static List<String> TWO_MORE_KEYWORDS =
Arrays.asList(new String[]{"Karihaya" + IDENTIFIER, "Hlikku" + IDENTIFIER});
final static String NOISE_WORD = "Mihalli + IDENTIFIER";
- // Test Unicode UTF-8 term for keyword searching: the last name of Lech
- // Wałęsa, which contains two non-USASCII range Unicode UTF-8 characters.
+ // Test Unicode UTF-8 term for keyword searching: a random sequence,
+ // unlikely to be encountered in actual collections data, of two USASCII
+ // characters followed by four non-USASCII range Unicode UTF-8 characters:
//
- // For details regarding the łę characters in the last name, see:
- // http://en.wikipedia.org/wiki/L_with_stroke
- // http://en.wikipedia.org/wiki/%C4%98
- final String UTF8_KEYWORD = "Wa" + '\u0142' + '\u0119' + "sa";
- // Non-existent term, consisting of two back-to-back sets of the first letters
- // of each of the words in a short pangram for the English alphabet.
+ // Δ : Greek capital letter Delta (U+0394)
+ // Ж : Cyrillic capital letter Zhe with breve (U+04C1)
+ // Ŵ : Latin capital letter W with circumflex (U+0174)
+ // Ω : Greek capital letter Omega (U+03A9)
+
+ final String UTF8_KEYWORD = "to" + '\u0394' + '\u04C1' + '\u0174' +'\u03A9';
+ // Non-existent term unlikely to be encountered in actual collections
+ // data, consisting of two back-to-back sets of the first letters of
+ // each of the words in a short pangram for the English alphabet.
final static String NON_EXISTENT_KEYWORD = "jlmbsoqjlmbsoq";
final static String KEYWORD_SEPARATOR = " ";
// }
- // FIXME: Test currently fails with a true UTF-8 String - need to investigate why.
- // Will be commented out for now until we get this working ...
-/*
@Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
groups = {"utf8"})
public void searchWithUTF8Keyword(String testName) {
long numMatched = getNumMatched(res, NUM_MATCHES_EXPECTED);
Assert.assertEquals(numMatched, NUM_MATCHES_EXPECTED);
}
-*/
// Failure outcomes
private final String OBJECT_NAME_VALUE = "an object name";
private final String UPDATED_MEASURED_PART_VALUE = "updated measured part value";
- private final String UTF8_TITLE = "Audiorecording album cover signed by Lech "
+ private final String UTF8_DATA_SAMPLE = "Audiorecording album cover signed by Lech "
+ "Wa" + '\u0142' + '\u0119' + "sa";
/* (non-Javadoc)
* @param testName the test name
* @throws Exception the exception
*/
- /*
@Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
dependsOnMethods = {"create", "testSubmitRequest"}, groups={"utf8-create"})
- public void createWithUTF8Title(String testName) throws Exception {
+ public void createWithUTF8Data(String testName) throws Exception {
String testDataDir = System.getProperty("test-data.fileName");
String newId =
createFromXmlFile(testName, testDataDir + "/cspace-2779-utf-8-create.xml", false);
logger.debug("Attempting to retrieve just-created record ...");
}
CollectionobjectsCommon collectionObject = readCollectionObjectCommonPart(newId);
- String title = collectionObject.getTitle(); // will need to be changed for multi-valued title
+ String distinguishingFeatures = collectionObject.getDistinguishingFeatures();
if (logger.isDebugEnabled()) {
- logger.debug("Sent title: " + UTF8_TITLE);
- logger.debug("Received title: " + title);
+ logger.debug("Sent distinguishingFeatures: " + UTF8_DATA_SAMPLE);
+ logger.debug("Received distinguishingFeatures: " + distinguishingFeatures);
}
- Assert.assertTrue(title.equals(UTF8_TITLE));
+ Assert.assertTrue(distinguishingFeatures.equals(UTF8_DATA_SAMPLE));
}
- */
/* (non-Javadoc)
* @see org.collectionspace.services.client.test.ServiceTest#createList()