Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.ParameterList


     * @throws Exception if failed
     */
    @Test
    public void drain_multi() throws Exception {
        File file = folder.newFile("file");
        FileResourceMirror resource = new FileResourceMirror(profile(), new ParameterList());
        try {
            ProcessScript<StringBuilder> process = process("a", dummy(), driver(file.getName()));
            resource.prepare(script(process));

            DrainDriver<StringBuilder> driver = resource.createDrain(process);
View Full Code Here


     */
    @Test(expected = IOException.class)
    public void drain_invalid() throws Exception {
        File file = folder.newFolder("file");

        FileResourceMirror resource = new FileResourceMirror(profile(), new ParameterList());
        try {
            ProcessScript<StringBuilder> process = process("a", dummy(), driver(file.getName()));
            resource.prepare(script(process));

            DrainDriver<StringBuilder> driver = resource.createDrain(process);
View Full Code Here

        RuntimeContext.set(RuntimeContext.DEFAULT.mode(ExecutionMode.SIMULATION));

        File file = folder.newFile("file");
        file.delete();

        FileResourceMirror resource = new FileResourceMirror(profile(), new ParameterList());
        try {
            assertThat(RuntimeContext.get().canExecute(resource), is(true));
            ProcessScript<StringBuilder> process = process("a", dummy(), driver(file.getName()));
            resource.prepare(script(process));
View Full Code Here

     */
    @Test
    public void cleanupSource() throws Exception {
        File file = folder.newFile("file");
        ProcessScript<StringBuilder> process = process("testing", driver(file.getName()), dummy());
        FileResourceManipulator manipulator = new FileResourceManipulator(profile(), new ParameterList());

        assertThat(file.exists(), is(true));
        manipulator.cleanupSource(process);
        assertThat(file.exists(), is(false));
        manipulator.cleanupSource(process);
View Full Code Here

     */
    @Test
    public void cleanupDrain() throws Exception {
        File file = folder.newFile("file");
        ProcessScript<StringBuilder> process = process("testing", dummy(), driver(file.getName()));
        FileResourceManipulator manipulator = new FileResourceManipulator(profile(), new ParameterList());

        assertThat(file.exists(), is(true));
        manipulator.cleanupDrain(process);
        assertThat(file.exists(), is(false));
        manipulator.cleanupDrain(process);
View Full Code Here

    public void createSourceForSource() throws Exception {
        File file = folder.newFile("file");
        put(file, "Hello1, world!", "Hello2, world!", "Hello3, world!");

        ProcessScript<StringBuilder> process = process("testing", driver(file.getName()), dummy());
        FileResourceManipulator manipulator = new FileResourceManipulator(profile(), new ParameterList());

        SourceDriver<StringBuilder> driver = manipulator.createSourceForSource(process);
        try {
            driver.prepare();
            test(driver, "Hello1, world!", "Hello2, world!", "Hello3, world!");
View Full Code Here

     */
    @Test
    public void createDrainForSource() throws Exception {
        File file = folder.newFile("file");
        ProcessScript<StringBuilder> process = process("testing", driver(file.getName()), dummy());
        FileResourceManipulator manipulator = new FileResourceManipulator(profile(), new ParameterList());

        DrainDriver<StringBuilder> driver = manipulator.createDrainForSource(process);
        try {
            driver.prepare();
            driver.put(new StringBuilder("Hello1, world!"));
View Full Code Here

    public void createSourceForDrain() throws Exception {
        File file = folder.newFile("file");
        put(file, "Hello1, world!", "Hello2, world!", "Hello3, world!");

        ProcessScript<StringBuilder> process = process("testing", dummy(), driver(file.getName()));
        FileResourceManipulator manipulator = new FileResourceManipulator(profile(), new ParameterList());

        SourceDriver<StringBuilder> driver = manipulator.createSourceForDrain(process);
        try {
            driver.prepare();
            test(driver, "Hello1, world!", "Hello2, world!", "Hello3, world!");
View Full Code Here

     */
    @Test
    public void createDrainForDrain() throws Exception {
        File file = folder.newFile("file");
        ProcessScript<StringBuilder> process = process("testing", dummy(), driver(file.getName()));
        FileResourceManipulator manipulator = new FileResourceManipulator(profile(), new ParameterList());

        DrainDriver<StringBuilder> driver = manipulator.createDrainForDrain(process);
        try {
            driver.prepare();
            driver.put(new StringBuilder("Hello1, world!"));
View Full Code Here

        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (1, 'Hello1, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (2, 'Hello2, world!')");
        h2.execute("INSERT INTO PAIR (KEY, VALUE) VALUES (3, 'Hello3, world!')");

        JdbcResourceManipulator manipulator = new JdbcResourceManipulator(profile(), new ParameterList());

        assertThat(h2.count("PAIR"), is(3));
        manipulator.cleanupSource(process);
        assertThat(h2.count("PAIR"), is(0));
    }
View Full Code Here

TOP

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

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.