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:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user