Package com.asakusafw.bulkloader.bean

Examples of com.asakusafw.bulkloader.bean.ExporterBean


        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here


        table1.setErrorTableName("IMPORT_TARGET1_ERROR");
        table1.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA1", "INTDATA1", "DATEDATA1"}));
        table1.setErrorCodeColumn("ERROR_CODE");
        table1.setErrorCode("ERR01");
        targetTable.put("IMPORT_TARGET1", table1);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here

        table2.setErrorTableName("IMPORT_TARGET2_ERROR");
        table2.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorCodeColumn("ERROR_CODE");
        table2.setErrorCode("ERR02");
        targetTable.put("IMPORT_TARGET3", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here

        table2.setErrorTableName("IMPORT_TARGET2_ERROR");
        table2.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorCodeColumn("ERROR_CODE");
        table2.setErrorCode("ERR02");
        targetTable.put("IMPORT_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here

        table2.setErrorTableName("IMPORT_TARGET2_ERROR");
        table2.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorCodeColumn("ERROR_CODE");
        table2.setErrorCode("ERR02");
        targetTable.put("IMPORT_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here

        targetTable.put("IMPORT_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        table2.setDuplicateCheck(false);
        table2.setExportTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        targetTable.put("IMPORT_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here

        table2.setErrorTableName("IMPORT_TARGET2_ERROR");
        table2.setErrorTableColumns(Arrays.asList(new String[]{"TEXTDATA2", "INTDATA2", "DATEDATA2"}));
        table2.setErrorCodeColumn("ERROR_CODE");
        table2.setErrorCode("ERR02");
        targetTable.put("IMPORT_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setExportTargetTable(targetTable);
        bean.setJobflowSid("11");
        bean.setJobflowId(jobflowId);
        bean.setExecutionId(executionId);

        // テスト対象クラスを生成
        ExportDataCopy copy = new ExportDataCopy();

        // テスト対象クラス実行
View Full Code Here

        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        targetTable.put("EXP_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        targetTable.put("EXP_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("11");
        bean.setExportTargetTable(targetTable);
        bean.setJobflowId(testJobflowId1);
        bean.setExecutionId(testExecutionId);
        bean.setBatchId(testBatchId);
        bean.setTargetName("target1");

        File testFile = folder.newFile("testing");
        ExportFileReceive receive = new Mock(testFile, "src/test/data/exporter/SEND_OUT1.zip");
        boolean result = receive.receiveFile(bean);

        // 戻り値を検証
        assertTrue(result);

        // ファイルの中身を検証
        List<File> target1 = bean.getExportTargetTable("EXP_TARGET1").getExportFiles();
        List<File> target2 = bean.getExportTargetTable("EXP_TARGET2").getExportFiles();
        UnitTestUtil.assertSameFileList(testFile, target1.get(0), target1.get(1), target2.get(0));
    }
View Full Code Here

        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        targetTable.put("EXP_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        targetTable.put("EXP_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("12");
        bean.setExportTargetTable(targetTable);
        bean.setJobflowId(testJobflowId2);
        bean.setExecutionId(testExecutionId);
        bean.setBatchId(testBatchId);

        // プロパティを書き換え
        Properties prop = ConfigurationLoader.getProperty();
        prop.setProperty(Constants.PROP_KEY_EXP_FILE_DIR, "target/asakusa-thundergate");
        ConfigurationLoader.setProperty(prop);

        File testFile = folder.newFile("testing");
        ExportFileReceive receive = new Mock(testFile, "src/test/data/exporter/SEND_OUT2.zip");
        boolean result = receive.receiveFile(bean);

        // 戻り値を検証
       assertTrue(result);

        // ファイルの中身を検証
        List<File> target1 = bean.getExportTargetTable("EXP_TARGET1").getExportFiles();
        UnitTestUtil.assertSameFileList(testFile, target1.get(0));
    }
View Full Code Here

        Map<String, ExportTargetTableBean> targetTable = new LinkedHashMap<String, ExportTargetTableBean>();
        ExportTargetTableBean table1 = new ExportTargetTableBean();
        targetTable.put("EXP_TARGET1", table1);
        ExportTargetTableBean table2 = new ExportTargetTableBean();
        targetTable.put("EXP_TARGET2", table2);
        ExporterBean bean = new ExporterBean();
        bean.setJobflowSid("13");
        bean.setExportTargetTable(targetTable);
        bean.setJobflowId(testJobflowId2);
        bean.setExecutionId(testExecutionId);
        bean.setBatchId(testBatchId);

        // プロパティを書き換え
        File missing = folder.newFolder("__MISSING__");
        Assume.assumeTrue(missing.delete());
        Properties prop = ConfigurationLoader.getProperty();
View Full Code Here

TOP

Related Classes of com.asakusafw.bulkloader.bean.ExporterBean

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.