import junit.framework.TestCase;
/** Test class for the Pizza class. */
/** this is clearly not a complete series of test
 *  cases.  Every condition in every method should 
 *  be exposed to testing to ensure the method performs
 *  as it should.  Remember that no more than a couple
 *  conditions should be tested in any one test case.
 *  Remember to start the name of every test with the 
 *  word test, otherwise it will not be executed.
 *  Remember to use meaningful test names and document
 *  the condition that you are testing.
 *  If you get stuck - two very good sources of guidance
 *  are the DrJava help system on testing, or go to the
 *  JUnit.org website - there is an easy to follow article
 *  at http://unit.sourcforge.net/testinfected/testing.htm
 */ 

public class PizzaTester extends TestCase {
  /** 
   * Test that the order number is properly assigned.
   * When testing that numbers are incremented by one
   * in a constructor, you must know what the value was
   * prior to incrementation.  You cannot use the sequence
   * that the object was created - based on its order in 
   * your file.  If you have five tests that all have constructors
   * in them, and the first three fail.  If the constructor was 
   * supposed to increment some number on creation of the object,
   * then that number will be three less than you might anticipate
   * based on the order of your test case methods.
   */
  public void testOrderNumber(){
    Pizza a = new Pizza();
    int temp = a.getOrderNum(); // get number from last instantiation (creation)
    Pizza b = new Pizza();
    assertEquals(b.getOrderNum(), temp+1); // number at next instantion must be greater by 1.
  }
}

