Package com.asakusafw.testtools

Examples of com.asakusafw.testtools.Configuration


     * @return DBコネクション
     * @throws SQLException コネクションの取得に失敗した場合
     */
    public static Connection getConnection() throws SQLException {

        Configuration conf = Configuration.getInstance();
        String driver = conf.getJdbcDriver();
        String user = conf.getJdbcUser();
        String password = conf.getJdbcPassword();
        String url = conf.getJdbcUrl();
        if (driver == null) {
            throw new IllegalArgumentException("jdbcDriver must not be null");
        }
        if (url == null) {
            throw new IllegalArgumentException("jdbcUrl must not be null");
View Full Code Here


    /**
     * このシートに対応するモデルクラスを返す。
     * @return 対応するモデルクラス
     */
    public Class<? extends Writable> getModelClass() {
        Configuration conf = Configuration.getInstance();
        String pkgName = conf.getModelPackage();
        String simpleName = JavaName.of(tablename).toTypeName();
        Class<? extends Writable> cl;
        cl = findModelClass(pkgName, null, simpleName);
        if (cl != null) {
            return cl;
View Full Code Here

        }
        tableList = new ArrayList<String>(args.length);
        for (String tablename : args) {
            tableList.add(tablename);
        }
        Configuration conf = Configuration.getInstance();
        String outputDirectoryName = conf.getOutputDirectory();
        if (outputDirectoryName == null) {
            throw new IllegalArgumentException("output directory must not be null");
        }
        outputDirectory = new File(outputDirectoryName);
        if (!outputDirectory.exists()) {
            throw new IllegalArgumentException(MessageFormat.format(
                    "出力ディレクトリ({0})が存在しません",
                    outputDirectoryName));
        }
        if (!outputDirectory.isDirectory()) {
            throw new IllegalArgumentException(MessageFormat.format(
                    "指定された出力ディレクトリ({0})はディレクトリでありません",
                    outputDirectoryName));
        }
        if (!outputDirectory.canWrite()) {
            throw new IllegalArgumentException(MessageFormat.format(
                    "指定された出力ディレクトリ({0})の書き込み権が存在しません",
                    outputDirectoryName));
        }
        databaseName = conf.getDatabaseName();
        if (databaseName == null) {
            throw new IllegalArgumentException("database name must not be null");
        }
        conn = DbUtils.getConnection();
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.testtools.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.