Package com.asakusafw.testdriver.core

Examples of com.asakusafw.testdriver.core.DifferenceSinkFactory


        TestToolRepository repo = new TestToolRepository(getClass().getClassLoader());

        File file = temp.newFile("example.html");
        file.delete();

        DifferenceSinkFactory factory = repo.getDifferenceSinkFactory(file.toURI());
        DifferenceSink sink = factory.createSink(SIMPLE, new TestContext.Empty());
        try {
            Simple expected = new Simple();
            expected.text = "expected";
            Simple actual = new Simple();
            actual.text = "actual";
View Full Code Here


        TestToolRepository repo = new TestToolRepository(getClass().getClassLoader());

        File file = temp.newFile("example.invalid");
        file.delete();

        DifferenceSinkFactory factory = repo.getDifferenceSinkFactory(file.toURI());
        try {
            DifferenceSink sink = factory.createSink(SIMPLE, new TestContext.Empty());
            sink.close();
            fail();
        } catch (IOException e) {
            // ok.
        }
View Full Code Here

     */
    @Test
    public void dumpDifference_factory() {
        final MockDiffSink sink = new MockDiffSink();
        MockFlowDriverOutput mock = new MockFlowDriverOutput(getClass(), new MockTestDataToolProvider());
        mock.dumpDifference(new DifferenceSinkFactory() {
            @Override
            public <T> DifferenceSink createSink(DataModelDefinition<T> definition, TestContext context) throws IOException {
                return sink;
            }
        });
View Full Code Here

        final MockDiffSink sink = new MockDiffSink();
        MockFlowDriverOutput mock = new MockFlowDriverOutput(getClass(), new MockTestDataToolProvider() {
            @Override
            public DifferenceSinkFactory getDifferenceSinkFactory(URI uri) {
                assertThat(uri.getPath(), endsWith("testing"));
                return new DifferenceSinkFactory() {
                    @Override
                    public <T> DifferenceSink createSink(DataModelDefinition<T> definition, TestContext context) {
                        return sink;
                    }
                };
View Full Code Here

        final MockDiffSink sink = new MockDiffSink();
        MockFlowDriverOutput mock = new MockFlowDriverOutput(getClass(), new MockTestDataToolProvider() {
            @Override
            public DifferenceSinkFactory getDifferenceSinkFactory(URI uri) {
                assertThat(uri.getPath(), endsWith("testing"));
                return new DifferenceSinkFactory() {
                    @Override
                    public <T> DifferenceSink createSink(DataModelDefinition<T> definition, TestContext context) {
                        return sink;
                    }
                };
View Full Code Here

TOP

Related Classes of com.asakusafw.testdriver.core.DifferenceSinkFactory

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.