Package com.documents4j.api

Examples of com.documents4j.api.IFileSource


    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT)
    public void testFileSourceToFileConsumerExecute() throws Exception {
        File source = validFile(true), target = makeTarget(true);
        IFileSource fileSource = mock(IFileSource.class);
        when(fileSource.getFile()).thenReturn(source);

        IFileConsumer fileConsumer = mock(IFileConsumer.class);

        assertTrue(getConverter().convert(fileSource).as(validInputType()).to(target, fileConsumer).as(validTargetType()).execute());
        assertTrue(source.exists());
View Full Code Here


    }

    @Test//(timeout = DEFAULT_CONVERSION_TIMEOUT)
    public void testFileSourceToFileConsumerFuture() throws Exception {
        File source = validFile(true), target = makeTarget(true);
        IFileSource fileSource = mock(IFileSource.class);
        when(fileSource.getFile()).thenReturn(source);

        IFileConsumer fileConsumer = mock(IFileConsumer.class);

        assertTrue(getConverter().convert(fileSource).as(validInputType()).to(target, fileConsumer).as(validTargetType()).schedule().get());
        assertTrue(source.exists());
View Full Code Here

TOP

Related Classes of com.documents4j.api.IFileSource

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.