use of net.sf.marineapi.nmea.event.SentenceEvent in project marine-api by ktuukkan.
the class HeadingProviderTest method testHDTSentenceRead.
/**
* Test method for
* {@link net.sf.marineapi.provider.AbstractProvider#sentenceRead(net.sf.marineapi.nmea.event.SentenceEvent)}
* .
*/
@Test
public void testHDTSentenceRead() {
Sentence s = factory.createParser(HDTTest.EXAMPLE);
assertNull(event);
instance.sentenceRead(new SentenceEvent(this, s));
assertNotNull(event);
assertEquals(90.1, event.getHeading(), 0.1);
assertTrue(event.isTrue());
}
use of net.sf.marineapi.nmea.event.SentenceEvent in project marine-api by ktuukkan.
the class PositionProviderTest method testSentenceReadWithGGA.
/**
* Test method for
* {@link net.sf.marineapi.provider.AbstractProvider#sentenceRead(net.sf.marineapi.nmea.event.SentenceEvent)}
* .
*/
@Test
public void testSentenceReadWithGGA() {
SentenceFactory sf = SentenceFactory.getInstance();
Sentence gga = sf.createParser(GGATest.EXAMPLE);
assertNull(event);
instance.sentenceRead(new SentenceEvent(this, gga));
assertNull(event);
Sentence rmc = sf.createParser(RMCTest.EXAMPLE);
assertNull(event);
instance.sentenceRead(new SentenceEvent(this, rmc));
assertNotNull(event);
}
Aggregations