@Test(description = "Test to check the exception for file that is not a ballerina file.") public void formatCLINotABalFileTest() { List<String> argList = new ArrayList<>(); argList.add(RES_DIR.resolve("invalidFile.txt").toString()); try { FormatUtil.execute(argList, false, false, RES_DIR); } catch (BLauncherException e) { List<String> exception = e.getMessages(); if (exception.size() == 1) { Assert.assertEquals(exception.get(0), "error: " + Messages.getNotABallerinaFile(), "actual exception didn't match the expected."); } else { Assert.fail("failed the test with " + exception.size() + " exceptions where there needs to be 1 exception"); } } }
@Override public void execute() { Path sourceRootPath = Paths.get(System.getProperty(USER_DIR)); FormatUtil.execute(argList, helpFlag, dryRun, sourceRootPath); }
FormatCmd implements BLauncherCmd { @Override public void execute() { Path sourceRootPath = Paths.get(System.getProperty(USER_DIR)); FormatUtil.execute(argList, helpFlag, dryRun, sourceRootPath); } }
FormatCmd implements BLauncherCmd { @Override public void execute() { Path sourceRootPath = Paths.get(System.getProperty(USER_DIR)); FormatUtil.execute(argList, helpFlag, dryRun, sourceRootPath); }  }
FormatCmd implements BLauncherCmd { @Override public void execute() { Path sourceRootPath = Paths.get(System.getProperty(USER_DIR)); FormatUtil.execute(argList, helpFlag, dryRun, sourceRootPath); }  @Override void execute(); @Override String getName(); @Override void printLongDesc(StringBuilder out); @Override void printUsage(StringBuilder out); @Override void setParentCmdParser(CommandLine parentCmdParser); }
FormatCmd implements BLauncherCmd { @Override public void execute() { Path sourceRootPath = Paths.get(System.getProperty(USER_DIR)); FormatUtil.execute(argList, helpFlag, dryRun, sourceRootPath); }  @Override void execute(); @Override String getName(); @Override void printLongDesc(StringBuilder out); @Override void printUsage(StringBuilder out); @Override void setParentCmdParser(CommandLine parentCmdParser);  }