Package com.asakusafw.testdriver

Examples of com.asakusafw.testdriver.MockTextDefinition


     */
    @Test
    public void simple() throws Exception {
        TemporaryInputPreparator target = new TemporaryInputPreparator(factory);
        ModelOutput<Text> open = target.createOutput(
                new MockTextDefinition(),
                new MockTemporaryImporter(Text.class, "target/testing/input"),
                EMPTY);
        try {
            open.write(new Text("Hello, world!"));
            open.write(new Text("This is a test."));
View Full Code Here


        MockFileExporter exporter = new MockFileExporter(Text.class, "target/testing/hello");
        TemporaryOutputRetriever retriever = new TemporaryOutputRetriever(factory);

        putText("target/testing/hello", "Hello, world!", "This is a test.");

        MockTextDefinition definition = new MockTextDefinition();
        DataModelSource result = retriever.createSource(definition, exporter, EMPTY);
        try {
            DataModelReflection ref;
            ref = result.next();
            assertThat(ref, is(not(nullValue())));
            assertThat(definition.toObject(ref), is(new Text("Hello, world!")));

            ref = result.next();
            assertThat(ref, is(not(nullValue())));
            assertThat(definition.toObject(ref), is(new Text("This is a test.")));

            ref = result.next();
            assertThat(ref, is(nullValue()));
        } finally {
            result.close();
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.MockTextDefinition

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.