import DataStructures.*;
import Exceptions.*;

// Simple test program for search trees

public final class TestSearchTree
{
    public static void main( String [ ] args )
    {
        SearchTree t = new BinarySearchTree( );
        MyString result = null;

        try
          { t.insert( new MyString( "Becky" ) ); }
        catch( DuplicateItem e ) { }  // Cannot happen

        try
        {
            result = (MyString) t.find( new MyString( "Becky" ) );
            System.out.print( "Found " + result + ";" );
        }
        catch( ItemNotFound e )
          { System.out.print( "Becky not found;" ); }

        try
        {
            result = (MyString) t.find( new MyString( "Mark" ) );
            System.out.print( " Found " + result + ";" );
        }
        catch( ItemNotFound e )
          { System.out.print( " Mark not found;" ); }

        System.out.println( );
    }
}