|
|
@ -41,7 +41,8 @@ public class ResourceBundleEditorTests { |
|
|
|
editor.setAsText(BASE_NAME); |
|
|
|
editor.setAsText(BASE_NAME); |
|
|
|
Object value = editor.getValue(); |
|
|
|
Object value = editor.getValue(); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", value instanceof ResourceBundle); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", |
|
|
|
|
|
|
|
value instanceof ResourceBundle); |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
assertEquals(MESSAGE_KEY, string); |
|
|
|
assertEquals(MESSAGE_KEY, string); |
|
|
@ -53,7 +54,8 @@ public class ResourceBundleEditorTests { |
|
|
|
editor.setAsText(BASE_NAME + "_"); |
|
|
|
editor.setAsText(BASE_NAME + "_"); |
|
|
|
Object value = editor.getValue(); |
|
|
|
Object value = editor.getValue(); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", value instanceof ResourceBundle); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", |
|
|
|
|
|
|
|
value instanceof ResourceBundle); |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
assertEquals(MESSAGE_KEY, string); |
|
|
|
assertEquals(MESSAGE_KEY, string); |
|
|
@ -65,7 +67,8 @@ public class ResourceBundleEditorTests { |
|
|
|
editor.setAsText(BASE_NAME + "Lang" + "_en"); |
|
|
|
editor.setAsText(BASE_NAME + "Lang" + "_en"); |
|
|
|
Object value = editor.getValue(); |
|
|
|
Object value = editor.getValue(); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", value instanceof ResourceBundle); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", |
|
|
|
|
|
|
|
value instanceof ResourceBundle); |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
assertEquals("yob", string); |
|
|
|
assertEquals("yob", string); |
|
|
@ -77,7 +80,8 @@ public class ResourceBundleEditorTests { |
|
|
|
editor.setAsText(BASE_NAME + "LangCountry" + "_en_GB"); |
|
|
|
editor.setAsText(BASE_NAME + "LangCountry" + "_en_GB"); |
|
|
|
Object value = editor.getValue(); |
|
|
|
Object value = editor.getValue(); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", value instanceof ResourceBundle); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", |
|
|
|
|
|
|
|
value instanceof ResourceBundle); |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
assertEquals("chav", string); |
|
|
|
assertEquals("chav", string); |
|
|
@ -89,7 +93,8 @@ public class ResourceBundleEditorTests { |
|
|
|
editor.setAsText(BASE_NAME + "LangCountryDialect" + "_en_GB_GLASGOW"); |
|
|
|
editor.setAsText(BASE_NAME + "LangCountryDialect" + "_en_GB_GLASGOW"); |
|
|
|
Object value = editor.getValue(); |
|
|
|
Object value = editor.getValue(); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertNotNull("Returned ResourceBundle was null (must not be for valid setAsText(..) call).", value); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", value instanceof ResourceBundle); |
|
|
|
assertTrue("Returned object was not a ResourceBundle (must be for valid setAsText(..) call).", |
|
|
|
|
|
|
|
value instanceof ResourceBundle); |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
ResourceBundle bundle = (ResourceBundle) value; |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
String string = bundle.getString(MESSAGE_KEY); |
|
|
|
assertEquals("ned", string); |
|
|
|
assertEquals("ned", string); |
|
|
|