本文整理汇总了Java中org.hsqldb.test.TestUtil类的典型用法代码示例。如果您正苦于以下问题:Java TestUtil类的具体用法?Java TestUtil怎么用?Java TestUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TestUtil类属于org.hsqldb.test包,在下文中一共展示了TestUtil类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TestScriptRunner
import org.hsqldb.test.TestUtil; //导入依赖的package包/类
public TestScriptRunner(String rcFileString, Map scriptFileMap)
throws IOException {
TestUtil.setAbortOnErr(true);
Map rcdataMap = new HashMap();
File rcFile = new File(rcFileString);
if (!rcFile.isFile())
throw new IllegalArgumentException(
"RC file '" + rcFileString + "' not a file");
String scriptPath, urlid;
Iterator it;
File file;
Reader reader = null;
it = scriptFileMap.values().iterator();
while (it.hasNext()) {
urlid = (String) it.next();
if (rcdataMap.containsKey(urlid)) continue;
try {
rcdataMap.put(urlid, new RCData(rcFile, urlid));
} catch (Exception e) {
throw new RuntimeException(
"Failed to instantiate RCData with file '"
+ rcFile + "' for urlid '" + urlid + "'", e);
}
}
it = scriptFileMap.keySet().iterator();
while (it.hasNext()) {
scriptPath = (String) it.next();
urlid = (String) scriptFileMap.get(scriptPath);
if (scriptPath.equals("-")) {
reader = new InputStreamReader(System.in);
} else {
file = new File(scriptPath);
if (!file.isFile()) throw new IOException("'" + file
+ "' is not a file");
if (!file.canRead()) throw new IOException("'" + file
+ "' is not readable");
reader = new FileReader(file);
}
scriptRuns.add(new ScriptRun(scriptPath,
reader, (RCData) rcdataMap.get(urlid)));
}
}