Main implements Console { Main(final @NotNull File cwd, final @NotNull Map<String, String> env, final @NotNull PrintStream stdout, final @NotNull PrintStream stderr) { this.cwd = cwd; this.env = env; this.stdout = stdout; this.stderr = stderr; } Main(final @NotNull File cwd,
         final @NotNull Map<String, String> env,
         final @NotNull PrintStream stdout,
         final @NotNull PrintStream stderr); @Override @NotNull File getCwd(); @Override @NotNull Map<String, String> getEnv(); @Override IO<Nothing> printLine(final @NotNull Object object); @Override IO<Nothing> printLineErr(final Object object); @Override Result<DisposablePrinter> openPrinter(final @NotNull File outFile); @Override void dispose(); static void setExitFunction(final @NotNull IntConsumer exitFunction); static void setSwapOutFunction(final @NotNull Function<PrintStream, PrintStream> swapOutFunction); static void main(final String[] args);  }
@Test public void testMainNoRuntimeExit() { Main.main(new String[] {"--blah"}); }
@Test public void testEmptyPlanExecution() { Main.main(new String[]{"-c", cacheBaseDir.getPath(), "-f", "src/test/resources/opears/emptyplan"}); }
@Test public void testDefultPlanExecution() { Main.main(new String[0]); }
@Test public void testNoPlanExecution() { Main.main(new String[]{"--no-plan"}); }
@Test public void testSimpleEchoDir() { Main.main(new String[]{"-c", cacheBaseDir.getPath(), "-f", "src/test/resources/opears/simpleEcho"}); }
@Test public void testOutputFile() { final File testOutputDir = new File(testOutputBaseDir, "testOutputFile"); testOutputDir.mkdirs(); final File testOutputFile = new File(testOutputDir, "out.txt"); if (testOutputFile.exists()) { testOutputFile.delete(); } Main.main(new String[]{"-c", cacheBaseDir.getPath(), "-f", "src/test/resources/opears/simpleEcho", "-o", testOutputFile.getPath()}); assertTrue("testOutputFile exists", testOutputFile.exists()); final File testOutputJson = new File(testOutputDir, "out.json"); if (testOutputJson.exists()) { testOutputJson.delete(); } Main.main(new String[]{"-c", cacheBaseDir.getPath(), "-f", "src/test/resources/opears/simpleEcho", "-j", "-o", testOutputJson.getPath()}); assertTrue("testOutputJson exists", testOutputJson.exists()); }
@Test public void testMainJustHelp() { Main.main(new String[] {"--help"}); }
@Test public void testMainJustVersion() { Main.main(new String[] {"--version"}); }
@Test public void testMain_scanUnfilteredPackage() throws Exception { File pack = TestPackageUtil.prepareTestPackage("unfiltered_package.zip"); Main.main(new String[]{"-c", cacheBaseDir.getPath(), pack.getPath()}); }