Examples of IFileConsumer


Examples of com.documents4j.api.IFileConsumer

        }
    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT, expected = ConverterAccessException.class)
    public void testFileToFileExecute() throws Exception {
        IFileConsumer fileConsumer = mock(IFileConsumer.class);
        File target = makeTarget(false);
        try {
            getConverter()
                    .convert(validFile(true)).as(validInputType())
                    .to(target, fileConsumer).as(validTargetType())
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

        }
    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT, expected = ConverterAccessException.class)
    public void testFileToFileFuture() throws Exception {
        IFileConsumer fileConsumer = mock(IFileConsumer.class);
        File target = makeTarget(false);
        try {
            getConverter()
                    .convert(validFile(true)).as(validInputType())
                    .to(target, fileConsumer).as(validTargetType())
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

    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());
        assertTrue(target.exists());
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

    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());
        assertTrue(target.exists());
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT, expected = ConversionFormatException.class)
    public void testConversionWithUnknownSourceFormatExecute() throws Exception {
        File target = makeTarget(false);
        IFileConsumer fileConsumer = mock(IFileConsumer.class);
        try {
            getConverter().convert(validFile(true)).as(UNKNOWN_TYPE)
                    .to(target, fileConsumer).as(validTargetType())
                    .execute();
            fail();
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT, expected = ConversionFormatException.class)
    public void testConversionWithUnknownSourceFormatFuture() throws Exception {
        File target = makeTarget(false);
        IFileConsumer fileConsumer = mock(IFileConsumer.class);
        try {
            getConverter().convert(validFile(true)).as(UNKNOWN_TYPE)
                    .to(target, fileConsumer).as(validTargetType())
                    .schedule().get();
            fail();
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT, expected = ConversionFormatException.class)
    public void testConversionWithUnknownTargetFormatExecute() throws Exception {
        File target = makeTarget(false);
        IFileConsumer fileConsumer = mock(IFileConsumer.class);
        try {
            getConverter().convert(validFile(true)).as(validInputType())
                    .to(target, fileConsumer).as(UNKNOWN_TYPE)
                    .execute();
            fail();
View Full Code Here

Examples of com.documents4j.api.IFileConsumer

    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT, expected = ConversionFormatException.class)
    public void testConversionWithUnknownTargetFormatFuture() throws Exception {
        File target = makeTarget(false);
        IFileConsumer fileConsumer = mock(IFileConsumer.class);
        try {
            getConverter().convert(validFile(true)).as(validInputType())
                    .to(target, fileConsumer).as(UNKNOWN_TYPE)
                    .schedule().get();
            fail();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.