Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.DriverScript


     * @throws Exception if failed
     */
    @Test
    public void createImporterProcessScript() throws Exception {
        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(String.class, "dummy", driver);
        ProcessScript<String> script = WindGateTestHelper.createProcessScript(String.class, description);

        assertThat(script.getDataClass(), equalTo(String.class));
        assertThat(script.getSourceScript().getResourceName(), is("file"));
        assertThat(script.getSourceScript().getConfiguration(), is(driver.getConfiguration()));
    }
View Full Code Here


     * @throws Exception if failed
     */
    @Test
    public void createExporterProcessScript() throws Exception {
        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(String.class, "dummy", driver);
        ProcessScript<String> script = WindGateTestHelper.createProcessScript(String.class, description);

        assertThat(script.getDataClass(), equalTo(String.class));
        assertThat(script.getDrainScript().getResourceName(), is("file"));
        assertThat(script.getDrainScript().getConfiguration(), is(driver.getConfiguration()));
    }
View Full Code Here

                createDummyDriverScript(),
                description.getDriverScript());
    }

    private static DriverScript createDummyDriverScript() {
        return new DriverScript(
                DUMMY_RESOURCE_NAME,
                Collections.<String, String>emptyMap());
    }
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", FileResourceProvider.class.getName());
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "testing",
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void createResourceManipulator_missing_profile() throws Exception {
        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "__MISSING__",
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", "__INVALID__");
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "testing",
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", FileResourceProvider.class.getName());
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "missing",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "testing",
View Full Code Here

    private ProcessScript<String> script() {
        return new ProcessScript<String>(
                "dummy",
                "testing",
                String.class,
                new DriverScript("dummy", Collections.<String, String>emptyMap()),
                new DriverScript("dummy", Collections.<String, String>emptyMap()));
    }
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", FileResourceProvider.class.getName());
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "testing",
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", FileResourceProvider.class.getName());
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateImporterDescription description = new MockImporterDescription(
                String.class,
                "testing",
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.DriverScript

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.