Package com.sun.media.parser

Examples of com.sun.media.parser.RawPullStreamParser


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);
    }
  }
View Full Code Here

TOP

Related Classes of com.sun.media.parser.RawPullStreamParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.