Package net.sf.fmj.test.compat.formats

Source Code of net.sf.fmj.test.compat.formats.H261FormatTest

package net.sf.fmj.test.compat.formats;

import java.awt.Dimension;

import javax.media.format.H261Format;

import junit.framework.TestCase;

public class H261FormatTest extends TestCase
{
  public void testConstructors()
  {
    {
      final H261Format f1 = new H261Format();
      assertEquals(f1.getDataType(), byte[].class);
      assertEquals(f1.getFrameRate(), -1.f);
      assertEquals(f1.getMaxDataLength(), -1);
      assertEquals(f1.getSize(), null);
      assertEquals(f1.getStillImageTransmission(), -1);
    }
   
   
    {
      final Dimension d = new Dimension(1, 2);
      final H261Format f1 = new H261Format(d, 1, int[].class, 2.f, 3);
      assertEquals(f1.getDataType(), int[].class);
      assertEquals(f1.getFrameRate(), 2.f);
      assertEquals(f1.getMaxDataLength(), 1);
      assertEquals(f1.getSize(), new Dimension(1, 2));
      assertTrue(f1.getSize() != d);
      assertEquals(f1.getStillImageTransmission(), 3);
    }
  }
 
  private void assertEquals(double a, double b)
  {
    assertTrue(a == b);
  }
}
TOP

Related Classes of net.sf.fmj.test.compat.formats.H261FormatTest

TOP
Copyright © 2018 www.massapi.com. 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.