@Test public void testPlainTextFileFileSystemStatusFilter() throws IOException { TemporalStringSequenceSource source = null; source = new TwitterFileStringSequenceSource( "src/test/resources/sampleStatusMessages.json", new USCountryCodeStatusFilter()); TemporalStringSequence status = null; status = source.nextStringSequence(); assertEquals(status.getStringSequence(), "Diffused sunlight #BlogRefresh http://t.co/TDyAk9qY"); status = source.nextStringSequence(); assertEquals(status, null); }
@Test public void testGZipFileClasspath() throws IOException { TemporalStringSequenceSource source = null; source = new TwitterFileStringSequenceSource("sampleStatusMessages.json.gz"); TemporalStringSequence status = null; status = source.nextStringSequence(); assertEquals(status.getStringSequence(), "Diffused sunlight #BlogRefresh http://t.co/TDyAk9qY"); status = source.nextStringSequence(); assertEquals( status.getStringSequence(), "@vicegandako i really love ur shows! Thank u very very much for making my every sunday night an awesome one! Love u vice... God bless"); status = source.nextStringSequence(); assertEquals( status.getStringSequence(), "@wired I keep complaining to government that the windfarms are poluting the sea with noise as sound travles further underwater in sea n sand"); status = source.nextStringSequence(); assertEquals(status, null); }