@Test public void testReadingMultipleValidPropertyFilesShouldLoadProperly() { boolean result = underTest.setUp("src/test/resources/testprj.properties,src/test/resources/a.txt,src/test/resources/b.txt"); Assert.assertTrue(result); }
public boolean setUp(final String propFiles) { boolean isLoadedProperly = true; if ("".equals(propFiles.trim())) { AllTestRunner.CONSOLE_LOG.info("No property files has been loaded into Environment class."); isLoadedProperly = false; } else { String[] strParts = propFiles.split(DELIMITER); String propFile; for (String strPart : strParts) { propFile = strPart; try { InputStream inp = new FileInputStream(propFile); properties.load(inp); inp.close(); } catch (IOException e) { AllTestRunner.CONSOLE_LOG.info("Cannot load property file: " + propFile); isLoadedProperly = false; } } } testEnvironmentID = getProperty(Environment.TEST_ENVIRONMENT_ID); return isLoadedProperly; }
Environment { public boolean setUp(final String propFiles) { boolean isLoadedProperly = true; if ("".equals(propFiles.trim())) { AllTestRunner.CONSOLE_LOG.info("No property files has been loaded into Environment class."); isLoadedProperly = false; } else { String[] strParts = propFiles.split(DELIMITER); String propFile; for (String strPart : strParts) { propFile = strPart; try { InputStream inp = new FileInputStream(propFile); properties.load(inp); inp.close(); } catch (IOException e) { AllTestRunner.CONSOLE_LOG.info("Cannot load property file: " + propFile); isLoadedProperly = false; } } } testEnvironmentID = getProperty(Environment.TEST_ENVIRONMENT_ID); return isLoadedProperly; } }
Environment { public boolean setUp(final String propFiles) { boolean isLoadedProperly = true; if ("".equals(propFiles.trim())) { AllTestRunner.CONSOLE_LOG.info("No property files has been loaded into Environment class."); isLoadedProperly = false; } else { String[] strParts = propFiles.split(DELIMITER); String propFile; for (String strPart : strParts) { propFile = strPart; try { InputStream inp = new FileInputStream(propFile); properties.load(inp); inp.close(); } catch (IOException e) { AllTestRunner.CONSOLE_LOG.info("Cannot load property file: " + propFile); isLoadedProperly = false; } } } testEnvironmentID = getProperty(Environment.TEST_ENVIRONMENT_ID); return isLoadedProperly; }  }
Environment { public boolean setUp(final String propFiles) { boolean isLoadedProperly = true; if ("".equals(propFiles.trim())) { AllTestRunner.CONSOLE_LOG.info("No property files has been loaded into Environment class."); isLoadedProperly = false; } else { String[] strParts = propFiles.split(DELIMITER); String propFile; for (String strPart : strParts) { propFile = strPart; try { InputStream inp = new FileInputStream(propFile); properties.load(inp); inp.close(); } catch (IOException e) { AllTestRunner.CONSOLE_LOG.info("Cannot load property file: " + propFile); isLoadedProperly = false; } } } testEnvironmentID = getProperty(Environment.TEST_ENVIRONMENT_ID); return isLoadedProperly; }  boolean setUp(final String propFiles); Properties getProperties(); String getProperty(final String name); boolean getBooleanProperty(final String name); String getProperty(final String name, final String def); void setProperty(final String name, final String value); String getTestEnvironmentID(); String getTestEnvironmentProperty(String propertyKey); void setTestEnvironmentProperty(String property, String value); }
Environment { public boolean setUp(final String propFiles) { boolean isLoadedProperly = true; if ("".equals(propFiles.trim())) { AllTestRunner.CONSOLE_LOG.info("No property files has been loaded into Environment class."); isLoadedProperly = false; } else { String[] strParts = propFiles.split(DELIMITER); String propFile; for (String strPart : strParts) { propFile = strPart; try { InputStream inp = new FileInputStream(propFile); properties.load(inp); inp.close(); } catch (IOException e) { AllTestRunner.CONSOLE_LOG.info("Cannot load property file: " + propFile); isLoadedProperly = false; } } } testEnvironmentID = getProperty(Environment.TEST_ENVIRONMENT_ID); return isLoadedProperly; }  boolean setUp(final String propFiles); Properties getProperties(); String getProperty(final String name); boolean getBooleanProperty(final String name); String getProperty(final String name, final String def); void setProperty(final String name, final String value); String getTestEnvironmentID(); String getTestEnvironmentProperty(String propertyKey); void setTestEnvironmentProperty(String property, String value); static final String GEPARD_RESULT_PATH; static final String GEPARD_HTML_RESULT_PATH; static final String GEPARD_XML_RESULT_PATH; static final String GEPARD_CSV_RESULT_PATH; static final String GEPARD_RESULT_TEMPLATE_PATH; static final String GEPARD_FILTER_CLASS; static final String GEPARD_FILTER_EXPRESSION; static final String GEPARD_TESTLIST_FILE; static final String GEPARD_TESTLIST_FAILURE_PATH; static final String GEPARD_TESTLIST_FAILURE_FILE; static final String GEPARD_TEST_RESOURCE_PATH; static final String GEPARD_THREADS; static final String GEPARD_DATA_DRIVEN_PATH_BASE; static final String GEPARD_DATA_DRIVEN_COLUMN_SPLITTER; static final String GEPARD_DATA_DRIVEN_FEEDER_CLASS; static final String GEPARD_LOAD_AND_EXIT; static final String GEPARD_PUBLIC_PATH; static final String GEPARD_PUBLIC_RESULT; static final String GEPARD_PUBLIC_ENABLED; static final String GEPARD_REMOTE_ENABLED; static final String GEPARD_REMOTE_PORT; static final String GEPARD_REMOTE_FULL_CONTROL; static final String JIRA_SITE_URL; static final String JIRA_SITE_USERNAME; static final String JIRA_SITE_PASSWORD; static final String SYSTEM_UNDER_TEST_VERSION; static final String TEST_ENVIRONMENT_ID; }