



import java.io.*;
import java.lang.*;

public class VelocityTest extends AbstractTest {

  public VelocityTest(String stream) {
      super(stream);
      className = "Velocity";
      fileName = "Velocity.java";

  }

  public boolean functionalSuite(){
    testScript1();
	  testScript2();
	  testScript3();
	  testScript4();
	  testScript5();
	  testScript6();
	  testScript7();
	  testScript8();
	  testScript9();
    testScript11();
    testScript12();
	  return true;
  }

  public boolean structuralSuite(){return true;}

  public boolean interactionSuite(){return true;}

  public boolean baselineSuite(){
    testScript1();
    testScript10();
    return true;
  }

  public boolean regressionSuite(){return true;}

  public boolean classInvariant(){
      return ((Velocity)OUT).direction < 360 && ((Velocity)OUT).direction >=0;
  }

  public boolean instantiateOUT(){
	OUT = new Velocity(100,45);
	return true;
  }

  protected boolean testScript1(){
      OUT = new Velocity();
      boolean result = testCase1();
      logTestResult("Script1",result && classInvariant());
      return result;
  }

  protected boolean testCase1(){
      if (((Velocity)OUT).direction == 0 && ((Velocity)OUT).speed == 0){
          return true;
      }
      else return false;
  }




  protected void testDispatch(int[] which)throws Exception{
	
      super.testDispatch(which);

  }



   public void finalize(){
      try{
          log.close();
      }catch(IOException e){
          e.printStackTrace();
      }
  }

  public static void main(String[] args){
    Runtime rt = Runtime.getRuntime();
    if(rt.freeMemory() > 16){
      VelocityTest tester = new VelocityTest("test.rpt");
      tester.testProcess();
    }else{
     System.out.println("Not enough memory\n");
    }
  }



}
