mock.app.App now tells mock.app.Event that the xml file strings are XMLFileType.Contents.

Made network.MessageEncoders.RaceVisionByteEncoder methods static (they were effectively static already).

shared.dataInput.XMLReader#readXMLFileToString(..) now throws an XMLReaderException if the file cannot be found.

visualiser.Controllers.StartController assumed XML messages were resource paths instead of file contents - fixed.

Testing:
networking tests now work again.
This commit is contained in:
fjc40
2017-07-20 01:01:29 +12:00
parent 4bcfc01ceb
commit 5cddaaed8e
24 changed files with 1031 additions and 142 deletions
@@ -1,8 +1,8 @@
package network.MessageDecoders;
import network.MessageEncoders.RaceVisionByteEncoder;
import org.junit.Assert;
import org.junit.Test;
import seng302.Networking.MessageEncoders.RaceVisionByteEncoder;
/**
* Created by hba56 on 23/04/17.
@@ -12,9 +12,8 @@ public class RaceStartStatusDecoderTest {
public void getByteArrayTest(){
long time = System.currentTimeMillis();
RaceVisionByteEncoder raceVisionByteEncoder = new RaceVisionByteEncoder();
long time2 = System.currentTimeMillis();
byte[] encodedRaceStartStatus = raceVisionByteEncoder.raceStartStatus(time, (short)1,
byte[] encodedRaceStartStatus = RaceVisionByteEncoder.raceStartStatus(time, (short)1,
time2, 2, (char)3);
RaceStartStatusDecoder testDecoder = new RaceStartStatusDecoder(encodedRaceStartStatus);