All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.catools.common.config.CTestManagementConfigs Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package org.catools.common.config;

import org.catools.common.utils.CStringUtil;

public class CTestManagementConfigs extends CConfigs {
  public static String getProjectName() {
    return getConfigs().getStringOrElse(Configs.TMS_PROJECT_NAME, "");
  }

  public static String getVersionName() {
    return getConfigs().getStringOrElse(Configs.TMS_VERSION_NAME, "");
  }

  public static String getUrlToTest() {
    return getConfigs().getStringOrElse(Configs.TMS_URL_FORMAT_TO_TEST, "");
  }

  public static String getUrlToTest(String testKey) {
    String string = getUrlToTest();
    return CStringUtil.isBlank(string) ? CStringUtil.EMPTY : CStringUtil.format(string, testKey);
  }

  public static String getUrlToDefect() {
    return getConfigs().getStringOrElse(Configs.TMS_URL_FORMAT_TO_DEFECT, "");
  }

  public static String getUrlToDefect(String testKey) {
    String string = getUrlToDefect();
    return CStringUtil.isBlank(string) ? CStringUtil.EMPTY : CStringUtil.format(string, testKey);
  }

  private enum Configs {
    TMS_URL_FORMAT_TO_DEFECT,
    TMS_URL_FORMAT_TO_TEST,
    TMS_PROJECT_NAME,
    TMS_VERSION_NAME,
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy