Class ApplicationPropertiesUtils

java.lang.Object
io.quarkus.deployment.dev.testing.ApplicationPropertiesUtils

public final class ApplicationPropertiesUtils extends Object
Utilities to create temporary application.properties files used in testing.
  • Field Details

  • Method Details

    • createTempApplicationProperties

      public static Path createTempApplicationProperties(String pathPrefix)
      Creates an empty application.properties file in a new temporary directory.
      Parameters:
      pathPrefix - a String to be used in generating the temporary directory's name
      Returns:
      the Path location where the application.properties file resides
    • createTempApplicationProperties

      public static Path createTempApplicationProperties(String pathPrefix, Map<String,String> config, io.quarkus.runtime.configuration.ConfigSourceOrdinal ordinal)
      Creates a application.properties file in a new temporary directory.
      Parameters:
      pathPrefix - a String to be used in generating the temporary directory's name
      config - a Map with the configuration content to store
      ordinal - an ConfigSourceOrdinal with the configuration ordinal
      Returns:
      the Path location where the application.properties file resides
    • createTempApplicationProperties

      public static Path createTempApplicationProperties(String pathPrefix, Map<String,String> config, int ordinal)
      Creates a application.properties file in a new temporary directory.
      Parameters:
      pathPrefix - a String to be used in generating the temporary directory's name
      config - a Map with the configuration content to store
      ordinal - an int with the configuration ordinal
      Returns:
      the Path location where the application.properties file resides
    • writeTempApplicationProperties

      public static void writeTempApplicationProperties(URI file, Map<String,String> config, io.quarkus.runtime.configuration.ConfigSourceOrdinal ordinal)
      Writes a configuration content in a temporary application.properties file.
      Parameters:
      file - an URI that points to the application.properties file.
      config - a Map with the configuration content to store
      ordinal - an ConfigSourceOrdinal with the configuration ordinal
    • writeTempApplicationProperties

      public static void writeTempApplicationProperties(URI file, Map<String,String> config, int ordinal)
      Writes a configuration content in a temporary application.properties file.
      Parameters:
      file - an URI that points to the application.properties file.
      config - a Map with the configuration content to store
      ordinal - an int with the configuration ordinal