Package com.asakusafw.testtools.excel

Examples of com.asakusafw.testtools.excel.ExcelUtils


            if (!lowcaseFilename.endsWith(".xls")) {
                throw new IOException(MessageFormat.format(
                        "Excelファイルではありません({0})",
                        file.getAbsolutePath()));
            }
            ExcelUtils excelUtils = new ExcelUtils(filename);
            TestDataHolder dataHolder = excelUtils.getTestDataHolder();
            dataHolderMap.put(dataHolder.getTablename(), dataHolder);
        }
        startTime = System.currentTimeMillis();
    }
View Full Code Here


     * @throws IOException
     */
    @Test
    public void testNormal() throws Exception {
        String TEST_FILE = "src/test/data/Excel/ExcelUtils/ALLT_TYPES_W_NOERR.xls";
        ExcelUtils excelUtils = new ExcelUtils(TEST_FILE);
        TestDataHolder dataHolder = excelUtils.getTestDataHolder();
        List<Writable> sourceList = dataHolder.getSource();
        List<Writable> expectList = dataHolder.getExpect();

        // sourceList, expectListに正しい値がセットされていることの確認
        testModelObjectList(sourceList);
View Full Code Here

     * @throws Exception
     */
    @Test
    public void testSort() throws Exception {
        String TEST_FILE = "src/test/data/Excel/ExcelUtils/SORT_TEST.xls";
        ExcelUtils excelUtils = new ExcelUtils(TEST_FILE);
        TestDataHolder dataHolder = excelUtils.getTestDataHolder();
        dataHolder.sort();
        List<Writable> expectList = dataHolder.getExpect();
        int expectValue = 0;
        for(Writable modelObject: expectList) {
            expectValue++;
View Full Code Here

     */
    @Test
    public void testCreateTable01() throws Exception {
        // カラム情報のリストを生成
        String filename = "src/test/data/Excel/ExcelUtils/ALLT_TYPES_W_NOERR.xls";
        ExcelUtils excelUtils =  new ExcelUtils(filename);
        List<ColumnInfo> list = excelUtils.getColumnInfos();

        Connection conn = null;
        try {
            conn = DbUtils.getConnection();
            // テーブル作成前にテーブルがあれば削除する
View Full Code Here

     */
    @Test
    public void testDropTable() throws Exception {
        // カラム情報のリストを生成
        String filename = "src/test/data/Excel/ExcelUtils/BAR.xls";
        ExcelUtils excelUtils =  new ExcelUtils(filename);
        List<ColumnInfo> list = excelUtils.getColumnInfos();

        Connection conn = null;
        try {
            // テーブル作成前にテーブルがあれば削除する
            String tablename = list.get(0).getTableName();
View Full Code Here

     * 指定のExcelファイルを読み込みdetaHolderを初期化する
     * @param filename Excelファイルのファイル名
     * @throws Exception
     */
    private void initDataHolder(String filename) throws Exception {
        ExcelUtils excelUtils = new ExcelUtils(filename);
        dataHolder = excelUtils.getTestDataHolder();
        // DBへのストアとDBからのロード
        Connection conn = null;
        try {
            conn = DbUtils.getConnection();
            dataHolder.storeToDatabase(conn, true);
View Full Code Here

TOP

Related Classes of com.asakusafw.testtools.excel.ExcelUtils

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.