package ru.ibs.framework.managers; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; public class TestPropManager { private static final Properties properties = new Properties(); private static TestPropManager instance; private TestPropManager() { try (FileInputStream fis = new FileInputStream("environment.properties")) { properties.load(fis); } catch (IOException e) { throw new RuntimeException("Неудалось загрузить environment.properties", e); } } public static TestPropManager getTestPropManager() { if (instance == null) { instance = new TestPropManager(); } return instance; } public String getProperty(String key) { return properties.getProperty(key); } }