test_class.file: tf-build-tools/tf-cmd-api/src/test/java/com/deliveredtechnologies/terraform/TerraformUtilsTest.java
test_class.identifier: TerraformUtilsTest
test_case.body: @Test
    public void getTerraformRootModuleDirReturnsTheDefaultDirWhenTheTfSourceDirIsNotFound() throws IOException {
      Path tfRootModulePath = TerraformUtils.getDefaultTerraformRootModuleDir();
      Assert.assertEquals(Paths.get("."), tfRootModulePath);
    }
test_case.class_method_signature: TerraformUtilsTest.getTerraformRootModuleDirReturnsTheDefaultDirWhenTheTfSourceDirIsNotFound()
test_case.full_signature: @Test public void getTerraformRootModuleDirReturnsTheDefaultDirWhenTheTfSourceDirIsNotFound()
test_case.identifier: getTerraformRootModuleDirReturnsTheDefaultDirWhenTheTfSourceDirIsNotFound
test_case.invocations: getDefaultTerraformRootModuleDir assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getTerraformRootModuleDirReturnsTheDefaultDirWhenTheTfSourceDirIsNotFound()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(TerraformUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(TerraformUtils.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: tf-build-tools/tf-cmd-api/src/main/java/com/deliveredtechnologies/terraform/TerraformUtils.java
focal_class.identifier: TerraformUtils
focal_class.class_method_signature: TerraformUtils.TerraformUtils()
focal_class.full_signature: private  TerraformUtils()
focal_class.identifier: TerraformUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TerraformUtils()
focal_class.class_method_signature: TerraformUtils.getDefaultTerraformRootModuleDir()
focal_class.full_signature: public static Path getDefaultTerraformRootModuleDir()
focal_class.identifier: getDefaultTerraformRootModuleDir
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getDefaultTerraformRootModuleDir()
focal_class.class_method_signature: TerraformUtils.getTerraformRootModuleDir(String tfmodule)
focal_class.full_signature: public static Path getTerraformRootModuleDir(String tfmodule)
focal_class.identifier: getTerraformRootModuleDir
focal_class.modifiers: public static
focal_class.parameters: (String tfmodule)
focal_class.return: Path
focal_class.signature: Path getTerraformRootModuleDir(String tfmodule)
focal_class.class_method_signature: TerraformUtils.getDefaultTfModulesDir()
focal_class.full_signature: public static Path getDefaultTfModulesDir()
focal_class.identifier: getDefaultTfModulesDir
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getDefaultTfModulesDir()
focal_method.body: public static Path getDefaultTerraformRootModuleDir() throws IOException {
      try {
        Path tfSourcePath = Paths.get("src", "main", "tf");
        if (tfSourcePath.toFile().exists() && tfSourcePath.toFile().isDirectory()) {
          return Files.walk(tfSourcePath, 2)
            .filter(path -> !path.toFile().isDirectory())
            .filter(path -> path.getFileName().toString().endsWith(".tf"))
            .findFirst().orElseThrow(() -> new IOException("Terraform root module not found")).getParent();
        }
      } catch (Exception e) {
        LOGGER.error(e.getMessage(), e);
        LOGGER.info("Unable to determine default Terraform root module directory; using current directory.");
      }
      return Paths.get(".");
    }
focal_method.class_method_signature: TerraformUtils.getDefaultTerraformRootModuleDir()
focal_method.full_signature: public static Path getDefaultTerraformRootModuleDir()
focal_method.identifier: getDefaultTerraformRootModuleDir
focal_method.invocations: get exists toFile isDirectory toFile getParent orElseThrow findFirst filter filter walk isDirectory toFile endsWith toString getFileName error getMessage info get
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: Path
focal_method.signature: Path getDefaultTerraformRootModuleDir()