Added MessageDecoder interface. All decoder implement this.
Added DecoderFactory. This creates an appropriate decoder based on a MessageType. BoatActionDecoder implements MessageDecoder. BoatLocationDecoder implements MessageDecoder. HeartBeatDecoder implements MessageDecoder. JoinAcceptance implements MessageDecoder. RaceStatusDecoder implements MessageDecoder. RequestToJoinDecoder implements MessageDecoder. XMLMessageDecoder implements MessageDecoder. Refactored CourseWind decoder/encoder. CourseWind decoder/encoder is for an individual CourseWind. CourseWinds decoder/encoder is for the combined message from the API. Documented BoatAction, and it now contains a BoatActionEnum instead of a byte. Refactored CourseWind and CourseWinds classes. They now expose correct units, instead of packed units. Added CourseWindDecoderTest, and updated CourseWindsDecoderTest. issue #35 #36 #story[1095]
This commit is contained in:
@@ -28,7 +28,8 @@ public class RequestToJoinDecoderTest {
|
||||
byte [] testEncodedMessage = RaceVisionByteEncoder.encode(message);
|
||||
|
||||
//Decode.
|
||||
RequestToJoinDecoder testDecoder = new RequestToJoinDecoder(testEncodedMessage);
|
||||
RequestToJoinDecoder testDecoder = new RequestToJoinDecoder();
|
||||
testDecoder.decode(testEncodedMessage);
|
||||
RequestToJoin decodedMessage = testDecoder.getMessage();
|
||||
|
||||
return decodedMessage;
|
||||
|
||||
Reference in New Issue
Block a user