public class RawPullStreamParserTest extends TestCase
{
public void testRawPullStreamParser() throws Exception
{
RawPullStreamParser p = new RawPullStreamParser();
assertEquals(p.getName(), "Raw pull stream parser");
try
{
p.setSource(new TracingDataSource());
assertTrue(false);
} catch (IncompatibleSourceException e)
{
} catch (IOException e)
{
e.printStackTrace();
assertTrue(false);
}
{
TracingPullBufferDataSource ds = new TracingPullBufferDataSource();
try
{
p.setSource(ds);
assertTrue(false);
} catch (IncompatibleSourceException e)
{
//e.printStackTrace();
} catch (IOException e)
{
e.printStackTrace();
assertTrue(false);
}
assertEquals(ds.getStringBuffer().toString(), "");
}
{
TracingPullBufferDataSource ds = new TracingPullBufferDataSource();
try
{
p.setSource(ds);
assertTrue(false);
} catch (IncompatibleSourceException e)
{
//e.printStackTrace();
} catch (IOException e)
{
e.printStackTrace();
assertTrue(false);
}
assertEquals(ds.getStringBuffer().toString(), "");
assertEquals(p.getTracks(), null);
}
}