Skip to content

Commit

Permalink
Add parser test for #138
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuukkan committed Feb 11, 2023
1 parent 43e732f commit 0d70d9f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ public void testCreate() {
assertEquals(1, msg.getMessageType());
}

@Test
public void testCreateIssue138() {
String ais = "!AIVDM,1,1,,A,15S0t`001TlGn>TNurwroHgD05;H,0*21";
AISSentence s = (AISSentence) sf.createParser(ais);
AISMessage msg = amf.create(s);
assertTrue(msg instanceof AISMessage01);
assertEquals(1, msg.getMessageType());
assertTrue((((AISMessage01) msg).isAccurate()));
}

@Test
public void testCreateWithTwo() {
AISMessage msg = amf.create(split1, split2);
Expand All @@ -51,4 +61,6 @@ public void testCreateWithIncorrectOrder() {
}
}



}

0 comments on commit 0d70d9f

Please sign in to comment.