@Test public void shouldUseHyphenatedClassNameWithoutRuntimeOrDeploymentNamespaceWhenComputingConfigGroupFileName() { String configRoot = "ClassName"; String expected = "config-group-class-name.adoc"; String fileName = computeConfigGroupDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.agroal.ConfigGroup"; expected = "quarkus-agroal-config-group.adoc"; fileName = computeConfigGroupDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.agroal.runtime.ClassName"; expected = "quarkus-agroal-config-group-class-name.adoc"; fileName = computeConfigGroupDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.keycloak.deployment.RealmConfig"; expected = "quarkus-keycloak-config-group-realm-config.adoc"; fileName = computeConfigGroupDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.extension.deployment.BuildTimeConfig"; expected = "quarkus-extension-config-group-build-time-config.adoc"; fileName = computeConfigGroupDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.extension.deployment.name.BuildTimeConfig"; expected = "quarkus-extension-config-group-name-build-time-config.adoc"; fileName = computeConfigGroupDocFileName(configRoot); assertEquals(expected, fileName); }
public static String computeConfigGroupDocFileName(String configGroupClassName) { final String sanitizedClassName; final Matcher matcher = Constants.PKG_PATTERN.matcher(configGroupClassName); if (!matcher.find()) { sanitizedClassName = CONFIG_GROUP_DOC_PREFIX + Constants.DASH + hyphenate(configGroupClassName); } else { String replacement = Constants.DASH + CONFIG_GROUP_DOC_PREFIX + Constants.DASH; sanitizedClassName = configGroupClassName .replaceFirst("io.", "") .replaceFirst("\\.runtime\\.", replacement) .replaceFirst("\\.deployment\\.", replacement); } return hyphenate(sanitizedClassName) .replaceAll("[\\.-]+", Constants.DASH) + Constants.ADOC_EXTENSION; }
DocGeneratorUtil { public static String computeConfigGroupDocFileName(String configGroupClassName) { final String sanitizedClassName; final Matcher matcher = Constants.PKG_PATTERN.matcher(configGroupClassName); if (!matcher.find()) { sanitizedClassName = CONFIG_GROUP_DOC_PREFIX + Constants.DASH + hyphenate(configGroupClassName); } else { String replacement = Constants.DASH + CONFIG_GROUP_DOC_PREFIX + Constants.DASH; sanitizedClassName = configGroupClassName .replaceFirst("io.", "") .replaceFirst("\\.runtime\\.", replacement) .replaceFirst("\\.deployment\\.", replacement); } return hyphenate(sanitizedClassName) .replaceAll("[\\.-]+", Constants.DASH) + Constants.ADOC_EXTENSION; } }
DocGeneratorUtil { public static String computeConfigGroupDocFileName(String configGroupClassName) { final String sanitizedClassName; final Matcher matcher = Constants.PKG_PATTERN.matcher(configGroupClassName); if (!matcher.find()) { sanitizedClassName = CONFIG_GROUP_DOC_PREFIX + Constants.DASH + hyphenate(configGroupClassName); } else { String replacement = Constants.DASH + CONFIG_GROUP_DOC_PREFIX + Constants.DASH; sanitizedClassName = configGroupClassName .replaceFirst("io.", "") .replaceFirst("\\.runtime\\.", replacement) .replaceFirst("\\.deployment\\.", replacement); } return hyphenate(sanitizedClassName) .replaceAll("[\\.-]+", Constants.DASH) + Constants.ADOC_EXTENSION; }  }
DocGeneratorUtil { public static String computeConfigGroupDocFileName(String configGroupClassName) { final String sanitizedClassName; final Matcher matcher = Constants.PKG_PATTERN.matcher(configGroupClassName); if (!matcher.find()) { sanitizedClassName = CONFIG_GROUP_DOC_PREFIX + Constants.DASH + hyphenate(configGroupClassName); } else { String replacement = Constants.DASH + CONFIG_GROUP_DOC_PREFIX + Constants.DASH; sanitizedClassName = configGroupClassName .replaceFirst("io.", "") .replaceFirst("\\.runtime\\.", replacement) .replaceFirst("\\.deployment\\.", replacement); } return hyphenate(sanitizedClassName) .replaceAll("[\\.-]+", Constants.DASH) + Constants.ADOC_EXTENSION; }  static String computeExtensionDocFileName(String configRoot); static String computeExtensionGeneralConfigDocFileName(String configRoot); static String computeConfigGroupDocFileName(String configGroupClassName); static String computeConfigRootDocFileName(String configRootClassName, String rootName); static void appendConfigItemsIntoExistingOnes(List<ConfigDocItem> existingConfigItems,
            List<ConfigDocItem> configDocItems); static void sort(List<ConfigDocItem> configDocItems); }
DocGeneratorUtil { public static String computeConfigGroupDocFileName(String configGroupClassName) { final String sanitizedClassName; final Matcher matcher = Constants.PKG_PATTERN.matcher(configGroupClassName); if (!matcher.find()) { sanitizedClassName = CONFIG_GROUP_DOC_PREFIX + Constants.DASH + hyphenate(configGroupClassName); } else { String replacement = Constants.DASH + CONFIG_GROUP_DOC_PREFIX + Constants.DASH; sanitizedClassName = configGroupClassName .replaceFirst("io.", "") .replaceFirst("\\.runtime\\.", replacement) .replaceFirst("\\.deployment\\.", replacement); } return hyphenate(sanitizedClassName) .replaceAll("[\\.-]+", Constants.DASH) + Constants.ADOC_EXTENSION; }  static String computeExtensionDocFileName(String configRoot); static String computeExtensionGeneralConfigDocFileName(String configRoot); static String computeConfigGroupDocFileName(String configGroupClassName); static String computeConfigRootDocFileName(String configRootClassName, String rootName); static void appendConfigItemsIntoExistingOnes(List<ConfigDocItem> existingConfigItems,
            List<ConfigDocItem> configDocItems); static void sort(List<ConfigDocItem> configDocItems); static final String LEVEL_HACK_URL; }