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:
+2
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user