11/*
2- * Copyright 2002-2006 the original author or authors.
2+ * Copyright 2002-2015 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2828 * @author Rick Evans
2929 * @author Chris Beams
3030 */
31- public final class ResourceBundleEditorTests {
31+ public class ResourceBundleEditorTests {
3232
3333 private static final String BASE_NAME = ResourceBundleEditorTests .class .getName ();
34+
3435 private static final String MESSAGE_KEY = "punk" ;
3536
3637
@@ -40,7 +41,8 @@ public void testSetAsTextWithJustBaseName() throws Exception {
4041 editor .setAsText (BASE_NAME );
4142 Object value = editor .getValue ();
4243 assertNotNull ("Returned ResourceBundle was null (must not be for valid setAsText(..) call)." , value );
43- assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." , value instanceof ResourceBundle );
44+ assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." ,
45+ value instanceof ResourceBundle );
4446 ResourceBundle bundle = (ResourceBundle ) value ;
4547 String string = bundle .getString (MESSAGE_KEY );
4648 assertEquals (MESSAGE_KEY , string );
@@ -52,7 +54,8 @@ public void testSetAsTextWithBaseNameThatEndsInDefaultSeparator() throws Excepti
5254 editor .setAsText (BASE_NAME + "_" );
5355 Object value = editor .getValue ();
5456 assertNotNull ("Returned ResourceBundle was null (must not be for valid setAsText(..) call)." , value );
55- assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." , value instanceof ResourceBundle );
57+ assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." ,
58+ value instanceof ResourceBundle );
5659 ResourceBundle bundle = (ResourceBundle ) value ;
5760 String string = bundle .getString (MESSAGE_KEY );
5861 assertEquals (MESSAGE_KEY , string );
@@ -64,7 +67,8 @@ public void testSetAsTextWithBaseNameAndLanguageCode() throws Exception {
6467 editor .setAsText (BASE_NAME + "Lang" + "_en" );
6568 Object value = editor .getValue ();
6669 assertNotNull ("Returned ResourceBundle was null (must not be for valid setAsText(..) call)." , value );
67- assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." , value instanceof ResourceBundle );
70+ assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." ,
71+ value instanceof ResourceBundle );
6872 ResourceBundle bundle = (ResourceBundle ) value ;
6973 String string = bundle .getString (MESSAGE_KEY );
7074 assertEquals ("yob" , string );
@@ -76,7 +80,8 @@ public void testSetAsTextWithBaseNameLanguageAndCountryCode() throws Exception {
7680 editor .setAsText (BASE_NAME + "LangCountry" + "_en_GB" );
7781 Object value = editor .getValue ();
7882 assertNotNull ("Returned ResourceBundle was null (must not be for valid setAsText(..) call)." , value );
79- assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." , value instanceof ResourceBundle );
83+ assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." ,
84+ value instanceof ResourceBundle );
8085 ResourceBundle bundle = (ResourceBundle ) value ;
8186 String string = bundle .getString (MESSAGE_KEY );
8287 assertEquals ("chav" , string );
@@ -88,31 +93,32 @@ public void testSetAsTextWithTheKitchenSink() throws Exception {
8893 editor .setAsText (BASE_NAME + "LangCountryDialect" + "_en_GB_GLASGOW" );
8994 Object value = editor .getValue ();
9095 assertNotNull ("Returned ResourceBundle was null (must not be for valid setAsText(..) call)." , value );
91- assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." , value instanceof ResourceBundle );
96+ assertTrue ("Returned object was not a ResourceBundle (must be for valid setAsText(..) call)." ,
97+ value instanceof ResourceBundle );
9298 ResourceBundle bundle = (ResourceBundle ) value ;
9399 String string = bundle .getString (MESSAGE_KEY );
94100 assertEquals ("ned" , string );
95101 }
96102
97- @ Test (expected = IllegalArgumentException .class )
103+ @ Test (expected = IllegalArgumentException .class )
98104 public void testSetAsTextWithNull () throws Exception {
99105 ResourceBundleEditor editor = new ResourceBundleEditor ();
100106 editor .setAsText (null );
101107 }
102108
103- @ Test (expected = IllegalArgumentException .class )
109+ @ Test (expected = IllegalArgumentException .class )
104110 public void testSetAsTextWithEmptyString () throws Exception {
105111 ResourceBundleEditor editor = new ResourceBundleEditor ();
106112 editor .setAsText ("" );
107113 }
108114
109- @ Test (expected = IllegalArgumentException .class )
115+ @ Test (expected = IllegalArgumentException .class )
110116 public void testSetAsTextWithWhiteSpaceString () throws Exception {
111117 ResourceBundleEditor editor = new ResourceBundleEditor ();
112118 editor .setAsText (" " );
113119 }
114120
115- @ Test (expected = IllegalArgumentException .class )
121+ @ Test (expected = IllegalArgumentException .class )
116122 public void testSetAsTextWithJustSeparatorString () throws Exception {
117123 ResourceBundleEditor editor = new ResourceBundleEditor ();
118124 editor .setAsText ("_" );
0 commit comments