package nxm.sys.test.junit.lib;

import nxm.sys.lib.*;
import nxm.sys.test.junit.NMTestCase;

/** This will test the ICEPacket class.
    @author  Adam Weisz
    @version $Id: ICEPacketTest.java,v 1.1 2014/02/14 17:34:24 adw Exp $
 */
public final class ICEPacketTest extends NMTestCase {

  /** public constructor to allow running this test case directly with JUnit. */
  public ICEPacketTest (String methodName) { this(methodName, null); }

  /** This constructor is required by NeXtMidas Unit Testing framework.
      @param methodName The name of the method being called.
      @param midas      The midas context to use when running the tests.
   */
  public ICEPacketTest (String methodName, Midas midas) {
    super(methodName, midas);
  }

  public void testGetTC () {
    ICEPacket icePacket = new ICEPacket();
    icePacket.setTC(0, 1, 101, 2000, 1.0001);
    double wsec = icePacket.getTCWSec();
    double fsec = icePacket.getTCFSec();
    Time time = icePacket.getTC();
    assertEquals("getTCWSec()", 2000,   wsec);
    assertEquals("getTCFSec()", 1.0001, fsec);
    assertEquals("getTC() wsec", 2001, time.getWSec());
    assertEquals("getTC() fsec", 0.0001, time.getFSec(), 1E-6);
  }

  public void testGetTCWSec () {} // Tested in getTC()
  public void testGetTCFSec () {} // Tested in getTC()
  public void testSetTC () {} // Tested in getTC()
  
}