Examples of StartedProcess


Examples of org.zeroturnaround.exec.StartedProcess

    }

    private void testConversionValid(File source, File target) throws Exception {
        assertTrue(source.exists());
        assertFalse(target.exists());
        StartedProcess conversion = getOfficeBridge().doStartConversion(source, getSourceDocumentType(), target, getTargetDocumentType());
        assertEquals(
                ExternalConverterScriptResult.CONVERSION_SUCCESSFUL.getExitValue().intValue(),
                conversion.getFuture().get().getExitValue());
        assertTrue(target.exists());
    }
View Full Code Here

Examples of org.zeroturnaround.exec.StartedProcess

    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT)
    public void testConversionCorrupt() throws Exception {
        File target = makeTarget(false);
        StartedProcess conversion = getOfficeBridge()
                .doStartConversion(corruptSourceFile(true), getSourceDocumentType(), target, getTargetDocumentType());
        assertEquals(
                ExternalConverterScriptResult.ILLEGAL_INPUT.getExitValue().intValue(),
                conversion.getFuture().get().getExitValue());
        assertFalse(target.exists());
    }
View Full Code Here

Examples of org.zeroturnaround.exec.StartedProcess

    }

    @Test(timeout = DEFAULT_CONVERSION_TIMEOUT)
    public void testConversionInexistent() throws Exception {
        File target = makeTarget(false);
        StartedProcess conversion = getOfficeBridge()
                .doStartConversion(inexistentSourceFile(), getSourceDocumentType(), target, getTargetDocumentType());
        assertEquals(
                ExternalConverterScriptResult.INPUT_NOT_FOUND.getExitValue().intValue(),
                conversion.getFuture().get().getExitValue());
        assertFalse(target.exists());
    }
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.