Package com.asakusafw.compiler.testing

Examples of com.asakusafw.compiler.testing.DirectImporterDescription


     * no input.
     */
    @Test
    public void validate_no_input() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new DirectImporterDescription(Line1.class, "some/file-*"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "something", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
View Full Code Here


         * @throws IOException 終了処理に失敗した場合
         * @throws IllegalArgumentException 引数に{@code null}が指定された場合
         */
        public In<T> flow() throws IOException {
            close();
            DirectImporterDescription description = new DirectImporterDescription(type, path.toPath('/'));
            description.setDataSize(dataSize);
            return flow.createIn(name, description);
        }
View Full Code Here

     */
    public FlowPartDriverInput(TestDriverContext driverContext, FlowDescriptionDriver descDriver, String name,
            Class<T> modelType) {
        super(driverContext.getCallerClass(), driverContext.getRepository(), name, modelType);
        String importPath = FlowPartDriverUtils.createInputLocation(driverContext, name).toPath('/');
        this.importerDescription = new DirectImporterDescription(modelType, importPath);
        this.in = descDriver.createIn(name, importerDescription);
    }
View Full Code Here

     * @throws Exception 例外が発生した場合
     */
    @Test
    public void dupCheck() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<Ex1> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
View Full Code Here

     * @throws Exception 例外が発生した場合
     */
    @Test
    public void invalidNormalTargetColumns() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<MockUnionModel> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<MockUnionModel> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
View Full Code Here

     * @throws Exception 例外が発生した場合
     */
    @Test
    public void invalidErrorTargetColumns() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<MockUnionModel> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<MockUnionModel> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
View Full Code Here

     * @throws Exception 例外が発生した場合
     */
    @Test
    public void invalidCheckColumns() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<MockUnionModel> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<MockUnionModel> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
View Full Code Here

     * @throws Exception 例外が発生した場合
     */
    @Test
    public void no_primary_importers() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new DirectImporterDescription(Ex1.class, "a/a"));
        Out<Ex1> out1 = flow.createOut("out1", new Export("primary"));
        FlowDescription desc = new IdentityFlow<Ex1>(in1, out1);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here

        String tableName = testUtils.getTablenameByClass(modelType);
        addCreateIn(tableName, tableName);
        String path = FlowPartDriverUtils.createInputLocation(driverContext, tableName).toPath('/');
        LOG.info("DirectImporterDescription生成:Path=" + path);
        ImporterDescription desc = new DirectImporterDescription(modelType, path);
        return flowDescriptionDriver.createIn(tableName, desc);
    }
View Full Code Here

        String path = FlowPartDriverUtils.createInputLocation(driverContext, excelFileName).toPath('/');

        LOG.info("DirectImporterDescription生成:Path=" + excelFileName);

        DirectImporterDescription desc = new DirectImporterDescription(modelType, path);

        String inName;
        int offset = excelFileName.lastIndexOf('/');
        if (offset > -1) {
            inName = excelFileName.substring(offset + 1);
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.testing.DirectImporterDescription

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.