Package com.asakusafw.testdriver.testing.flowpart

Examples of com.asakusafw.testdriver.testing.flowpart.SimpleFlowPart


        In<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class)
            .verify("data/difference-out.json", new IdentityVerifier())
            .dumpDifference(target.getPath());
        try {
            tester.runTest(new SimpleFlowPart(in, out));
            fail();
        } catch (AssertionError e) {
            // ok.
        }
        assertThat(target.exists(), is(true));
View Full Code Here


        In<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class)
            .verify("data/difference-out.json", new IdentityVerifier())
            .dumpDifference(target.toURI().toString());
        try {
            tester.runTest(new SimpleFlowPart(in, out));
            fail();
        } catch (AssertionError e) {
            // ok.
        }
        assertThat(target.exists(), is(true));
View Full Code Here

        In<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class)
            .verify("data/difference-out.json", new IdentityVerifier())
            .dumpDifference(target);
        try {
            tester.runTest(new SimpleFlowPart(in, out));
            fail();
        } catch (AssertionError e) {
            // ok.
        }
        assertThat(target.exists(), is(true));
View Full Code Here

        tester.setFrameworkHomePath(framework.getHome());
        In<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class)
            .verify("data/simple-out.json", new IdentityVerifier())
            .dumpDifference(target.getPath());
        tester.runTest(new SimpleFlowPart(in, out));
        assertThat(target.exists(), is(false));
    }
View Full Code Here

            FlowPartTester tester = new FlowPartTester(getClass());
            tester.setFrameworkHomePath(framework.getHome());
            In<Simple> in = tester.input("in", Simple.class).prepare(inUrl.toExternalForm());
            Out<Simple> out = tester.output("out", Simple.class).verify(outUrl.toExternalForm(), new IdentityVerifier());
            tester.runTest(new SimpleFlowPart(in, out));
        } finally {
            closeQuietly(loader);
        }
    }
View Full Code Here

    public void withSpace() {
        FlowPartTester tester = new FlowPartTester(getClass());
        tester.setFrameworkHomePath(framework.getHome());
        In<Simple> in = tester.input("in", Simple.class).prepare("data/with space-in.json");
        Out<Simple> out = tester.output("out", Simple.class).verify("data/with space-out.json", new IdentityVerifier());
        tester.runTest(new SimpleFlowPart(in, out));
    }
View Full Code Here

        FlowPartTester tester = new FlowPartTester(getClass());
        tester.setFrameworkHomePath(framework.getHome());
        In<Simple> in = tester.input("in", Simple.class).prepare(prefix + "data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class).verify(prefix + "data/simple-out.json", new IdentityVerifier());
        tester.runTest(new SimpleFlowPart(in, out));
    }
View Full Code Here

        FlowPartTester tester = new FlowPartTester(getClass());
        tester.setFrameworkHomePath(framework.getHome());
        FlowPartDriverInput<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json").withDataSize(DataSize.TINY);
        assertEquals(DataSize.TINY, in.getImporterDescription().getDataSize());
        Out<Simple> out = tester.output("out", Simple.class).verify("data/simple-out.json", new IdentityVerifier());
        tester.runTest(new SimpleFlowPart(in, out));
    }
View Full Code Here

        tester.setFrameworkHomePath(framework.getHome());
        In<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class).verify("data/simple-out.json", new IdentityVerifier());

        File escaped = tester.getDriverContext().getBatchApplicationsInstallationPath();
        tester.runTest(new SimpleFlowPart(in, out));

        assertThat(getDefaultBatchappsLocation().exists(), is(false));

        // escaped batchapps location must be deleted after run the test.
        assertThat(escaped.exists(), is(false));
View Full Code Here

        FlowPartTester tester = new FlowPartTester(getClass());
        tester.getDriverContext().setBatchApplicationsInstallationPath(explicitBatchappsLocation);
        tester.setFrameworkHomePath(framework.getHome());
        In<Simple> in = tester.input("in", Simple.class).prepare("data/simple-in.json");
        Out<Simple> out = tester.output("out", Simple.class).verify("data/simple-out.json", new IdentityVerifier());
        tester.runTest(new SimpleFlowPart(in, out));

        assertThat(explicitBatchappsLocation.exists(), is(true));
        assertThat(getDefaultBatchappsLocation().exists(), is(false));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.testing.flowpart.SimpleFlowPart

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.