Author: dmaliarevich
Date: 2010-02-19 10:57:59 -0500 (Fri, 19 Feb 2010)
New Revision: 20387
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5218, code adjustments.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2010-02-19
15:51:55 UTC (rev 20386)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2010-02-19
15:57:59 UTC (rev 20387)
@@ -150,22 +150,22 @@
nsIDOMDocument doc = controller.getXulRunnerEditor().getDOMDocument();
nsIDOMElement localeText = doc.getElementById(LOCALE_TEXT0_ID);
String localizedText = getLocalizedText(localeText);
- checkLocaleStrings(file, "en", localizedText);
+ checkLocaleStrings(file, "en", localizedText); //$NON-NLS-1$
localeText = doc.getElementById(LOCALE_TEXT1_ID);
localizedText = getLocalizedText(localeText);
- checkLocaleStrings(file, "de", localizedText);
+ checkLocaleStrings(file, "de", localizedText); //$NON-NLS-1$
localeText = doc.getElementById(LOCALE_TEXT2_ID);
localizedText = getLocalizedText(localeText);
/*
* f:view will use default locale if nothing is specified.
*/
- checkLocaleStrings(file, "en_US", localizedText);
+ checkLocaleStrings(file, "en_US", localizedText); //$NON-NLS-1$
localeText = doc.getElementById(LOCALE_TEXT_ID);
localizedText = getLocalizedText(localeText);
- checkLocaleStrings(file, "en_GB", localizedText);
+ checkLocaleStrings(file, "en_GB", localizedText); //$NON-NLS-1$
closeEditors();
}
@@ -352,13 +352,16 @@
}
ClassLoader classLoader = new URLClassLoader(urls, ClassLoader
.getSystemClassLoader());
+
ResourceBundle bundle = ResourceBundle.getBundle(bundleName,
new Locale(localeName), classLoader);
String bundleText = bundle.getString(bundleKey);
assertNotNull(bundleText);
assertTrue(
"Text is '" + currentText + "', but should be in
'"//$NON-NLS-1$ //$NON-NLS-2$
- + localeName + "' locale", bundleText.equalsIgnoreCase(currentText));
//$NON-NLS-1$
+ + localeName
+ + "' locale, bundle's value is '" + bundleText +
"'", bundleText.equalsIgnoreCase(currentText) //$NON-NLS-1$ //$NON-NLS-2$
+ );
}
/**