File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/test/java/com/ibm/watson/developer_cloud Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,17 @@ public static String getStringFromInputStream(InputStream is) {
7171 /** The prop. */
7272 protected Properties prop = new Properties ();
7373
74+ public String getExistingProperty (String property ) {
75+ String value = prop .getProperty (property );
76+ if (value == null ) throw new IllegalStateException ("A property expected to exist does not exist: " + property );
77+ return value ;
78+ }
79+ public String getValidProperty (String property ) {
80+ String value = getExistingProperty (property );
81+ if ("" .equals (value )) throw new IllegalStateException ("Property " + property + " is empty. It's probably unset." );
82+ return value ;
83+ }
84+
7485 /**
7586 * Sets the up.
7687 *
You can’t perform that action at this time.
0 commit comments