Merge remote-tracking branch 'remotes/origin/splitIntoTwoModules' into NetworkedVisualiser

# Conflicts:
#	visualiser/src/main/java/seng302/VisualiserInput.java
main
cbt24 9 years ago
parent b1db9ee5be
commit 3f42d56502

@ -49,8 +49,4 @@ public class StreamedBoat extends Boat {
}
return azimuth;
}
public int getSourceID() {
return sourceID;
}
}

@ -1,4 +1,4 @@
package seng302.Networking;
package seng302;
import org.xml.sax.SAXException;
import seng302.Mock.*;
import seng302.Networking.BinaryMessageDecoder;
@ -37,14 +37,13 @@ public class VisualiserInput implements Runnable
private Map<Integer, BoatLocationMessage> boatLocation;
public VisualiserInput(Socket connectionSocket) throws IOException{
public VisualiserInput(StreamedCourse course) throws IOException{
//connectionSocket = new Socket(InetAddress.getLocalHost(), 4942);
this.connectionSocket = connectionSocket;
this.connectionSocket = new Socket("livedata.americascup.com",4941);
this.course = new StreamedCourse();
this.course = course;
this.boatLocation = new HashMap<>();
this.connectionSocket = connectionSocket;
//start Time
@ -209,9 +208,7 @@ public class VisualiserInput implements Runnable
public static void main(String argv[]) throws Exception
{
//this is the test data that streams form the AC35 website
Socket socket = new Socket("livedata.americascup.com",4941);
VisualiserInput receiver = new VisualiserInput(socket);
VisualiserInput receiver = new VisualiserInput(new StreamedCourse());
receiver.run();
}

@ -21,11 +21,6 @@ import static org.junit.Assert.assertTrue;
public class FailBoatXMLTest {
String path = "mockXML/boatXML/";
@Test(expected = SAXException.class)
public void emptyFile() throws SAXException, ParserConfigurationException, ParseException, IOException {
new BoatXMLReader("empty.xml");
}
@Test(expected = NumberFormatException.class)
public void invalidSourceID() throws SAXException, ParserConfigurationException, ParseException, IOException {
new BoatXMLReader(path + "invalidSourceID.xml");

Loading…
Cancel
Save