use of net.sf.marineapi.nmea.parser.SentenceFactory in project marine-api by ktuukkan.
the class SentenceReaderTest method testFireSentenceEventWithUnexpectedType.
@Test
public void testFireSentenceEventWithUnexpectedType() {
assertNull(sentence);
SentenceFactory sf = SentenceFactory.getInstance();
Sentence s = sf.createParser(BODTest.EXAMPLE);
reader.fireSentenceEvent(s);
assertNull(sentence);
}
use of net.sf.marineapi.nmea.parser.SentenceFactory 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