Added connection screen to allow users to select available hosts from a preconfigured list.

- Added ConnectionController for initial client setup
- Added RaceConnection class for socket data and checking
- Configures StartController with a socket drawn from a host table

#story[782]
This commit is contained in:
Connor Taylor-Brown
2017-05-03 03:40:36 +12:00
parent ad58407021
commit ac4fbda848
9 changed files with 236 additions and 111 deletions
@@ -0,0 +1,30 @@
package seng302;
import org.junit.Before;
import org.junit.Test;
import static org.testng.Assert.*;
/**
* Created by connortaylorbrown on 3/05/17.
*/
public class RaceConnectionTest {
private RaceConnection onlineConnection;
private RaceConnection offlineConnection;
@Before
public void setUp() {
onlineConnection = new RaceConnection("livedata.americascup.com", 4941);
offlineConnection = new RaceConnection("localhost", 4942);
}
@Test
public void onlineConnectionStatusReady() {
assertTrue(onlineConnection.check());
}
@Test
public void offlineConnectionStatusOffline() {
assertFalse(offlineConnection.check());
}
}