runtests.java

来自「一种解析csv文件特别好的方法」· Java 代码 · 共 33 行

JAVA
33
字号
package test.org.relique.jdbc.csv;

import junit.framework.*;

public class RunTests
{
  public static String DEFAULT_FILEPATH="C:\\Downloads\\opensource\\sourceforge\\csvjdbc\\csvjdbc-r0-9\\src\\src\\testdata";
  
  public static Test suite()
  {
    TestSuite suite= new TestSuite();
    suite.addTestSuite(TestSqlParser.class);
    suite.addTestSuite(TestCsvDriver.class);
    suite.addTestSuite(TestScrollableDriver.class);
    return suite;
  }

  public static void main(String[] args)
  {
    String filePath = args[0];
    if (filePath == null)
    	filePath=DEFAULT_FILEPATH;
    // set the file location as a property so that it is easy to pass around
    System.setProperty(TestCsvDriver.SAMPLE_FILES_LOCATION_PROPERTY,filePath);

    // get the driver manager to log to sysout
    //DriverManager.setLogWriter( new PrintWriter(System.out));

    // kick off the tests. Note call main() instead of run() so that error codes
    // are returned so that they can be trapped by ant
    junit.textui.TestRunner.main(new String[]{"test.org.relique.jdbc.csv.RunTests"});
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?