java - Which type of resource file to use to store constants -
i developing application tests web services, , use junit parameterized tests. want read parameters resources file. wondering best way store these parameters.
in .properties file ?
test1.inputpath= c:\\path test1.expectedoutputpath= c:\\path test2.inputpath= c:\\path2 test2.expectedoutputpath= c:\\path2
in xml file?
<test> <inputpath> c:\path <\inputpath> <expectedoutputpath> c:\path <\expectedoutputpath> <\test> <test> <inputpath> c:\path2 <\inputpath> <expectedoutputpath> c:\path2 <\expectedoutputpath> <\test>
other way this?
thanks.
do not try make life more complicated ;) can read property files in way:
properties prop = new properties(); inputstream input = new fileinputstream(filename); prop.load(input); string s = prop.getproperty("test1.inputpath");
and import:
import java.util.properties;
is still complicated you?
Comments
Post a Comment