Package com.documents4j.api

Examples of com.documents4j.api.IInputStreamSource


    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT)
    public void testInputStreamSourceToInputStreamConsumerExecute() throws Exception {
        File source = validFile(true);

        InputStream inputStream = spy(new FileInputStream(source));
        IInputStreamSource inputStreamSource = mock(IInputStreamSource.class);
        when(inputStreamSource.getInputStream()).thenReturn(inputStream);

        OutputStream outputStream = mock(OutputStream.class);
        IInputStreamConsumer inputStreamConsumer = mock(IInputStreamConsumer.class);
        doAnswer(new CloseStreamAnswer()).when(inputStreamConsumer).onComplete(any(InputStream.class));
View Full Code Here


    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT)
    public void testInputStreamSourceToInputStreamConsumerFuture() throws Exception {
        File source = validFile(true);

        InputStream inputStream = spy(new FileInputStream(source));
        IInputStreamSource inputStreamSource = mock(IInputStreamSource.class);
        when(inputStreamSource.getInputStream()).thenReturn(inputStream);

        OutputStream outputStream = mock(OutputStream.class);
        IInputStreamConsumer inputStreamConsumer = mock(IInputStreamConsumer.class);
        doAnswer(new CloseStreamAnswer()).when(inputStreamConsumer).onComplete(any(InputStream.class));
View Full Code Here

TOP

Related Classes of com.documents4j.api.IInputStreamSource

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.