PrintWriter out;
@Before
public void setUp() throws NumberFormatException, UnknownHostException {
System.out.println(getClass().toString());
Settings settings = Settings.getReference();
if(Settings.settingsfile != null)
if(Settings.settingsfile.contains("null"))
fail("no settings file found");
try {
socket = new Socket("127.0.0.1", settings.getInteger(ManualSettings.commandport));
} catch (IOException e) {
fail("can NOT connect");
}
if(socket != null){
stdin = new BufferedReader(new InputStreamReader(System.in));
try {
out = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(socket.getOutputStream())), true);
} catch (IOException e) {
fail("can NOT connect to output socket");
}
// login on connect
String user = settings.readSetting("user0");
String pass = settings.readSetting("pass0");
out.println(user + ":" + pass);
// read feedback
new Thread(new Runnable() {
@Override