import junit.framework.TestCase;
/** Test class to test the Topping 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 ToppingTester extends TestCase {
  /** Test constructor that takes two parameters and
   *  the toString method.
   */
  public void testConstructorAndToString() {
    Topping bacon = new Topping("Bacon",1.25);
    assertEquals(bacon.toString(), "name: Bacon price: 1.25");
  }
  /** test the constructor that only accepts a 
   *  topping name as an input parameter and the
   *  toString method
   */ 
  public void testConstructor2AndToString() {
    Topping tofu = new Topping("Tofu");
    assertEquals(tofu.toString(), "name: Tofu price: 1.25");
  }
}

