In net.sourceforge.jwebunit.junit.WebTester:
-
Why wrap with a RuntimeException instead of a JWebUnit exception (or why not
avoid wrapping)? Why dump the exception/stack to the console?
-
What if I simply want to detect if a resource
exists? Shouldn't you use an exception that must be advertised for exceptions
like missing resource?
-
Could you document the exception you do
throw?
- Support for resources seem incomplete. Am I missing something?
/**
* Return the value of a web resource based on
its key. This translates to a property file lookup with the locale
* based on the current TestContext.
*
* @param key name of the web resource.
* @return value of the web resource, encoded
according to TestContext.
*/
public String getMessage(String key) {
String message = "";
Locale locale = testContext.getLocale();
try {
message = ResourceBundle.getBundle(
getTestContext().getResourceBundleName(), locale)
.getString(key);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("No
message found for key [" + key
+ "].", e);
}
return message;
}
____________________________________________________________________________________Ready
for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users