Kaydet (Commit) 9b8fb077 authored tarafından Noel Grandin's avatar Noel Grandin

java: inline some test properties

Change-Id: I8be2ee13652ed7223e41765811db577ecc1c85d6
üst a7d12921
......@@ -63,20 +63,7 @@ public class ListSelection extends integration.forms.TestCase
/* ------------------------------------------------------------------ */
public void checkUserListSelection() throws com.sun.star.uno.Exception, java.lang.Exception
{
boolean interactiveTest = param.getBool( "Interactive" );
if ( interactiveTest )
{
prepareDocument();
waitForUserInput();
closeDocumentByUI();
}
else
{
int runs = param.getInt( "Runs" );
if ( runs == 0 )
runs = 10;
int runs = 5;
for ( int i = 0; i < runs; ++i )
{
log.println( "Round " + ( i + 1 ) + " of " + runs );
......@@ -86,7 +73,6 @@ public class ListSelection extends integration.forms.TestCase
closeDocument();
}
}
}
/* ------------------------------------------------------------------ */
final private void impl_clickListBox()
......
......@@ -40,31 +40,14 @@ public class CfgParser
private String iniFile = "";
public CfgParser(String ini)
{
if (ini != null)
{
this.iniFile = ini;
}
}
public void getIniParameters(TestParameters param)
{
debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
Properties cfg = null;
if (iniFile.length() == 0)
{
//no iniFile given, search one in the users home directory
cfg = getProperties(getDefaultFileName(true));
//try to search the user dir if no iniFile could be found yet
if (cfg == null)
{
cfg = getProperties(getDefaultFileName(false));
}
}
else
{
cfg = getProperties(iniFile);
}
Properties cfg = getProperties(iniFile);
if (cfg != null)
{
......@@ -161,28 +144,4 @@ public class CfgParser
return prop;
}
private String getDefaultFileName(boolean home)
{
String fileSeparator = System.getProperty("file.separator");
String path = "";
if (home)
{
//look inside the home directory
path = System.getProperty("user.home");
}
else
{
path = System.getProperty("user.dir");
}
if (fileSeparator.equals("/"))
{
//suppose I'm on Unix-platform
return path + fileSeparator + ".runner.props";
}
else
{
//suppose I'm on Windows
return path + fileSeparator + "runner.props";
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment