Class PropertiesTestUtil

java.lang.Object
ca.cdr.test.util.PropertiesTestUtil

public class PropertiesTestUtil extends Object
Utility class for handling properties file operations in tests.
  • Constructor Details

  • Method Details

    • loadPortsFromPropertiesFile

      public static Map<String,Map<String,Integer>> loadPortsFromPropertiesFile(String thePropertiesLocation)
      Loads a properties file and extracts port configurations organized by module type and module ID.
      Parameters:
      thePropertiesLocation - the path to the properties file. Can be a regular file path or a classpath resource prefixed with "classpath:"
      Returns:
      a map where the key is module type and the value is a map of module ID to port number
      Throws:
      RuntimeException - if the properties file cannot be read