} else if (forReader instanceof URL) {
cfis = ((URL)forReader).openStream();
reader = new InputStreamReader(cfis, "UTF-8");
}
}
ConfigurationFile cf = null;
if ( testCase == OPT_TEST_CASE) {
cf = new ConfigurationFile(options);
} else if (testCase == OPT_CL_TEST_CASE) {
cf = new ConfigurationFile(options, fakeClassLoader);
} else if (testCase == OPT_NULL_TEST_CASE) {
cf = new ConfigurationFile(options, null);
} else if (testCase == RDR_OPT_TEST_CASE) {
cf = new ConfigurationFile(reader, options);
} else if (testCase == RDR_OPT_CL_TEST_CASE) {
cf = new ConfigurationFile(reader, options, fakeClassLoader);
} else if (testCase == RDR_OPT_NULL_TEST_CASE) {
cf = new ConfigurationFile(reader, options, null);
}
String s = cf.toString();
logger.log(Level.INFO, "toString()=" + s);
assertion(s != null, "toString method returns null");
assertion(s.length() != 0, "toString method returns empty string");
if (withReader(testCase)) {
if (reader != null) reader.close();