test_class.declarator: projectPath
test_class.modifier: private
test_class.original_string: private Path projectPath;
test_class.type: Path
test_class.var_name: projectPath
test_class.declarator: srcPath
test_class.modifier: private
test_class.original_string: private Path srcPath;
test_class.type: Path
test_class.var_name: srcPath
test_class.declarator: homeCache
test_class.modifier: private
test_class.original_string: private Path homeCache;
test_class.type: Path
test_class.var_name: homeCache
test_class.file: cli/ballerina-packerina/src/test/java/org/ballerinalang/packerina/cmd/AddCommandTest.java
test_class.identifier: AddCommandTest
test_class.superclass: extends CommandTest
test_case.body: @Test(description = "Test add command")
      public void testAddCommand() throws IOException {
          // Test if no arguments was passed in
          String[] args = {"mainmodule"};
          AddCommand addCommand = new AddCommand(projectPath, printStream);
          new CommandLine(addCommand).parseArgs(args);
          addCommand.execute();
          // Validate against spec
          // -- mymodule/
          // --- Module.md      <- module level documentation
          // --- main.bal       <- Contains default main method.
          // --- resources/     <- resources for the module (available at runtime)
          // --- tests/         <- tests for this module (e.g. unit tests)
          // ---- testmain.bal  <- test file for main
          // ---- resources/    <- resources for these tests
          Path moduleDir = srcPath.resolve("mainmodule");
  
          Assert.assertTrue(Files.exists(moduleDir));
          Assert.assertTrue(Files.isDirectory(moduleDir));
          Assert.assertTrue(Files.exists(moduleDir.resolve("Module.md")));
          Assert.assertTrue(Files.exists(moduleDir.resolve("main.bal")));
          Assert.assertTrue(Files.exists(moduleDir.resolve("resources")));
          Assert.assertTrue(Files.isDirectory(moduleDir.resolve("resources")));
  
          Path moduleTests = moduleDir.resolve("tests");
          Assert.assertTrue(Files.exists(moduleTests));
          Assert.assertTrue(Files.isDirectory(moduleTests));
          Assert.assertTrue(Files.exists(moduleTests.resolve("main_test.bal")));
          Assert.assertTrue(Files.exists(moduleTests.resolve("resources")));
          Assert.assertTrue(Files.isDirectory(moduleTests.resolve("resources")));
  
          Assert.assertTrue(readOutput().contains("Added new ballerina module"));
  
      }
test_case.class_method_signature: AddCommandTest.testAddCommand()
test_case.full_signature: @Test(description = "Test add command") public void testAddCommand()
test_case.identifier: testAddCommand
test_case.invocations: parseArgs execute resolve assertTrue exists assertTrue isDirectory assertTrue exists resolve assertTrue exists resolve assertTrue exists resolve assertTrue isDirectory resolve resolve assertTrue exists assertTrue isDirectory assertTrue exists resolve assertTrue exists resolve assertTrue isDirectory resolve assertTrue contains readOutput
test_case.modifiers: @Test(description = "Test add command") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddCommand()
focal_class.declarator: userDir
focal_class.modifier: private
focal_class.original_string: private Path userDir;
focal_class.type: Path
focal_class.var_name: userDir
focal_class.declarator: errStream
focal_class.modifier: private
focal_class.original_string: private PrintStream errStream;
focal_class.type: PrintStream
focal_class.var_name: errStream
focal_class.declarator: jarFs
focal_class.modifier: private static
focal_class.original_string: private static FileSystem jarFs;
focal_class.type: FileSystem
focal_class.var_name: jarFs
focal_class.declarator: env
focal_class.modifier: private static
focal_class.original_string: private static Map<String, String> env;
focal_class.type: Map<String, String>
focal_class.var_name: env
focal_class.declarator: homeCache
focal_class.modifier: private
focal_class.original_string: private Path homeCache;
focal_class.type: Path
focal_class.var_name: homeCache
focal_class.declarator: argList
focal_class.modifier: @CommandLine.Parameters
      private
focal_class.original_string: @CommandLine.Parameters
      private List<String> argList;
focal_class.type: List<String>
focal_class.var_name: argList
focal_class.declarator: helpFlag
focal_class.modifier: @CommandLine.Option(names = {"--help", "-h"}, hidden = true)
      private
focal_class.original_string: @CommandLine.Option(names = {"--help", "-h"}, hidden = true)
      private boolean helpFlag;
focal_class.type: boolean
focal_class.var_name: helpFlag
focal_class.declarator: template = "main"
focal_class.modifier: @CommandLine.Option(names = {"--template", "-t"})
      private
focal_class.original_string: @CommandLine.Option(names = {"--template", "-t"})
      private String template = "main";
focal_class.type: String
focal_class.var_name: template
focal_class.declarator: list = false
focal_class.modifier: @CommandLine.Option(names = {"--list", "-l"})
      private
focal_class.original_string: @CommandLine.Option(names = {"--list", "-l"})
      private boolean list = false;
focal_class.type: boolean
focal_class.var_name: list
focal_class.file: cli/ballerina-packerina/src/main/java/org/ballerinalang/packerina/cmd/AddCommand.java
focal_class.identifier: AddCommand
focal_class.interfaces: implements BLauncherCmd
focal_class.class_method_signature: AddCommand.AddCommand()
focal_class.full_signature: public  AddCommand()
focal_class.identifier: AddCommand
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  AddCommand()
focal_class.class_method_signature: AddCommand.AddCommand(Path userDir, PrintStream errStream)
focal_class.full_signature: public  AddCommand(Path userDir, PrintStream errStream)
focal_class.identifier: AddCommand
focal_class.modifiers: public
focal_class.parameters: (Path userDir, PrintStream errStream)
focal_class.signature:  AddCommand(Path userDir, PrintStream errStream)
focal_class.class_method_signature: AddCommand.AddCommand(Path userDir, PrintStream errStream, Path homeCache)
focal_class.full_signature: public  AddCommand(Path userDir, PrintStream errStream, Path homeCache)
focal_class.identifier: AddCommand
focal_class.modifiers: public
focal_class.parameters: (Path userDir, PrintStream errStream, Path homeCache)
focal_class.signature:  AddCommand(Path userDir, PrintStream errStream, Path homeCache)
focal_class.class_method_signature: AddCommand.initJarFs()
focal_class.full_signature: private void initJarFs()
focal_class.identifier: initJarFs
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initJarFs()
focal_class.class_method_signature: AddCommand.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: AddCommand.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: AddCommand.printLongDesc(StringBuilder out)
focal_class.full_signature: @Override public void printLongDesc(StringBuilder out)
focal_class.identifier: printLongDesc
focal_class.modifiers: @Override public
focal_class.parameters: (StringBuilder out)
focal_class.return: void
focal_class.signature: void printLongDesc(StringBuilder out)
focal_class.class_method_signature: AddCommand.printUsage(StringBuilder out)
focal_class.full_signature: @Override public void printUsage(StringBuilder out)
focal_class.identifier: printUsage
focal_class.modifiers: @Override public
focal_class.parameters: (StringBuilder out)
focal_class.return: void
focal_class.signature: void printUsage(StringBuilder out)
focal_class.class_method_signature: AddCommand.setParentCmdParser(CommandLine parentCmdParser)
focal_class.full_signature: @Override public void setParentCmdParser(CommandLine parentCmdParser)
focal_class.identifier: setParentCmdParser
focal_class.modifiers: @Override public
focal_class.parameters: (CommandLine parentCmdParser)
focal_class.return: void
focal_class.signature: void setParentCmdParser(CommandLine parentCmdParser)
focal_class.class_method_signature: AddCommand.createModule(Path projectPath, String moduleName, String template)
focal_class.full_signature: private void createModule(Path projectPath, String moduleName, String template)
focal_class.identifier: createModule
focal_class.modifiers: private
focal_class.parameters: (Path projectPath, String moduleName, String template)
focal_class.return: void
focal_class.signature: void createModule(Path projectPath, String moduleName, String template)
focal_class.class_method_signature: AddCommand.applyBaloTemplate(Path modulePath, String template)
focal_class.full_signature: private void applyBaloTemplate(Path modulePath, String template)
focal_class.identifier: applyBaloTemplate
focal_class.modifiers: private
focal_class.parameters: (Path modulePath, String template)
focal_class.return: void
focal_class.signature: void applyBaloTemplate(Path modulePath, String template)
focal_class.class_method_signature: AddCommand.getModuleName(Path baloTemplate)
focal_class.full_signature: private String getModuleName(Path baloTemplate)
focal_class.identifier: getModuleName
focal_class.modifiers: private
focal_class.parameters: (Path baloTemplate)
focal_class.return: String
focal_class.signature: String getModuleName(Path baloTemplate)
focal_class.class_method_signature: AddCommand.findBaloTemplate(String template)
focal_class.full_signature: private Path findBaloTemplate(String template)
focal_class.identifier: findBaloTemplate
focal_class.modifiers: private
focal_class.parameters: (String template)
focal_class.return: Path
focal_class.signature: Path findBaloTemplate(String template)
focal_class.class_method_signature: AddCommand.getTemplates()
focal_class.full_signature: private List<String> getTemplates()
focal_class.identifier: getTemplates
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getTemplates()
focal_class.class_method_signature: AddCommand.getBaloTemplates()
focal_class.full_signature: private List<String> getBaloTemplates()
focal_class.identifier: getBaloTemplates
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getBaloTemplates()
focal_class.class_method_signature: AddCommand.getModuleToml(Path baloPath)
focal_class.full_signature: private Module getModuleToml(Path baloPath)
focal_class.identifier: getModuleToml
focal_class.modifiers: private
focal_class.parameters: (Path baloPath)
focal_class.return: Module
focal_class.signature: Module getModuleToml(Path baloPath)
focal_class.class_method_signature: AddCommand.isTemplateBalo(Path baloPath)
focal_class.full_signature: private boolean isTemplateBalo(Path baloPath)
focal_class.identifier: isTemplateBalo
focal_class.modifiers: private
focal_class.parameters: (Path baloPath)
focal_class.return: boolean
focal_class.signature: boolean isTemplateBalo(Path baloPath)
focal_class.class_method_signature: AddCommand.getTemplatePath()
focal_class.full_signature: private Path getTemplatePath()
focal_class.identifier: getTemplatePath
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getTemplatePath()
focal_class.class_method_signature: AddCommand.applyTemplate(Path modulePath, String template)
focal_class.full_signature: private void applyTemplate(Path modulePath, String template)
focal_class.identifier: applyTemplate
focal_class.modifiers: private
focal_class.parameters: (Path modulePath, String template)
focal_class.return: void
focal_class.signature: void applyTemplate(Path modulePath, String template)
focal_method.body: public AddCommand() {
          userDir = Paths.get(System.getProperty("user.dir"));
          errStream = System.err;
          homeCache = RepoUtils.createAndGetHomeReposPath();
          initJarFs();
      }
focal_method.class_method_signature: AddCommand.AddCommand()
focal_method.full_signature: public  AddCommand()
focal_method.identifier: AddCommand
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.signature:  AddCommand()