Fixed the RaceStatusDecoder not deserializing BoatStatus (a subobject of RaceStatus) properly.

RaceVisionByteEncoder.heartBeat now uses a long (and grabs the low 4 bytes from it), as the streaming spec requires a 4 byte unsigned int.
#story[778] #story[782]
This commit is contained in:
fjc40
2017-04-28 01:32:39 +12:00
parent d29c0a9439
commit 873089707d
3 changed files with 25 additions and 13 deletions
@@ -60,9 +60,16 @@ public class RaceStatusDecoderTest {
Assert.assertEquals(windDirection, decoderTest.getRaceWindDir());
Assert.assertEquals(windSpeed, decoderTest.getRaceWindSpeed());
Assert.assertEquals(boat1Status, decoderTest.getBoats().get(0).getBoatStatus());
Assert.assertEquals(boat1LegNumber, decoderTest.getBoats().get(0).getLegNumber());
Assert.assertEquals(boat1PenaltiesAwarded, decoderTest.getBoats().get(0).getNumPenaltiesAwarded());
BoatStatus boat1 = decoderTest.getBoats().get(0);
Assert.assertEquals(boat1SourceID, boat1.getSourceID());
Assert.assertEquals(boat1Status, boat1.getBoatStatus());
Assert.assertEquals(boat1LegNumber, boat1.getLegNumber());
Assert.assertEquals(boat1PenaltiesAwarded, boat1.getNumPenaltiesAwarded());
Assert.assertEquals(boat1PenaltiesServed, boat1.getNumPenaltiesServed());
Assert.assertEquals(boat1TimeAtNextMark, boat1.getEstTimeAtNextMark());
Assert.assertEquals(boat1TimeAtFinish, boat1.getEstTimeAtFinish());
}
}