I have a .properties
file where I load the name of the tests that will be deleted from my application. This file needs to have the same name as the "variables" since they all mean the same thing (excluded tests), the problem is that my code is only recognizing the last test (the NATONE in case).
data.properties:
prop.teste.excl = CQT-SUST
prop.teste.excl = NATONE
code:
public static Properties getProp() throws IOException
{
Properties props = new Properties();
FileInputStream file = new FileInputStream("src/resources/dados.properties");
props.load(file);
return props;
}
public ArrayList<String> testeInterno() throws IOException
{
String property;
ArrayList<String> testeInt = new ArrayList<String>();
Properties prop = getProp();
for ( int i = 0; i < prop.size(); i++)
{
property = "prop.teste.excl";
testeInt.add(i, prop.getProperty(property));
System.out.println(testeInt.get(i));
}
return testeInt;
}
I thought about putting ";" at the end of each line of my file but I do not know how to do the code that recognizes the ";" as end of line and also do not know if it would work.