GhostscriptHelper { public String getCliExecutionCommand() { return gsExec; } GhostscriptHelper();  GhostscriptHelper(String newGsExec); String getCliExecutionCommand(); void runGhostScriptImageGeneration(String pdf, String outDir, String image); void runGhostScriptImageGeneration(String pdf, String outDir, String image, String pageList); static final String GHOSTSCRIPT_ENVIRONMENT_VARIABLE; }
@Test public void ghostScriptEnvVarIsDefault() { GhostscriptHelper ghostscriptHelper = new GhostscriptHelper(); Assert.assertNotNull(ghostscriptHelper.getCliExecutionCommand()); }
@Test public void ghostScriptEnvVarIsExplicitlySpecified() { String gsExec = SystemUtil.getPropertyOrEnvironmentVariable(GhostscriptHelper.GHOSTSCRIPT_ENVIRONMENT_VARIABLE); if (gsExec == null) { gsExec = SystemUtil.getPropertyOrEnvironmentVariable(GhostscriptHelper.GHOSTSCRIPT_ENVIRONMENT_VARIABLE_LEGACY); } GhostscriptHelper ghostscriptHelper = new GhostscriptHelper(gsExec); Assert.assertNotNull(ghostscriptHelper.getCliExecutionCommand()); }
@Test public void ghostScriptEnvVarIsNull() { GhostscriptHelper ghostscriptHelper = new GhostscriptHelper(null); Assert.assertNotNull(ghostscriptHelper.getCliExecutionCommand()); }