com.mtp.pounder
Class TestInstanceFactory

java.lang.Object
  |
  +--com.mtp.pounder.TestInstanceFactory

public class TestInstanceFactory
extends Object

Manufactures an instance of the test object type for testing.

Author:
Matthew Pekar

Field Summary
protected  String setupClass
           
 
Constructor Summary
TestInstanceFactory(Element e)
           
TestInstanceFactory(String setupClass)
           
 
Method Summary
 boolean equals(Object o)
          Returns true if 'setupClass' is equal.
 String getSetupClass()
           
 Object instantiateInstance()
          Instantiate an instance of 'setupClass' using my ClassLoader.
protected  Object instantiateInstance(ClassLoader cl)
          Instantiate an instance of 'setupClass' using the given ClassLoader.
 void showNewTestInstance(ClassLoader cl, PounderPrefs prefs)
          Instantiates a new test instance using the given ClassLoader and wraps it in a Window at the location specified by the given PounderPrefs.
 Object showNewTestInstance(ClassLoader cl, PounderPrefs prefs, WindowWatcher ww)
          Instantiates a new test instance using the given ClassLoader and wraps it in a Window at the location specified by the given PounderPrefs.
 Object showNewTestInstance(PounderPrefs prefs, WindowWatcher ww)
          Instantiates a new test instance and wraps it in a Window at the location specified by the given PounderPrefs.
 String toString()
           
 Element toXML(Document doc)
          XML representation of TestInstanceFactory.
 Window wrapInWindow(Object object, PounderPrefs prefs)
          Wraps the given object in a Window, and places it at the location given in PounderPrefs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

setupClass

protected String setupClass
Constructor Detail

TestInstanceFactory

public TestInstanceFactory(Element e)
                    throws Exception

TestInstanceFactory

public TestInstanceFactory(String setupClass)
Method Detail

getSetupClass

public String getSetupClass()

showNewTestInstance

public Object showNewTestInstance(PounderPrefs prefs,
                                  WindowWatcher ww)
                           throws Exception
Instantiates a new test instance and wraps it in a Window at the location specified by the given PounderPrefs. Uses the given WindowWatcher's waitTillWindowPresent method, to make sure the Window is present before returning.

Returns:
The test instance.
Exception

showNewTestInstance

public Object showNewTestInstance(ClassLoader cl,
                                  PounderPrefs prefs,
                                  WindowWatcher ww)
                           throws Exception
Instantiates a new test instance using the given ClassLoader and wraps it in a Window at the location specified by the given PounderPrefs. Uses the given WindowWatcher's waitTillWindowPresent method, to make sure the Window is present before returning.

Returns:
The test instance.
Exception

showNewTestInstance

public void showNewTestInstance(ClassLoader cl,
                                PounderPrefs prefs)
                         throws Exception
Instantiates a new test instance using the given ClassLoader and wraps it in a Window at the location specified by the given PounderPrefs.

Exception

instantiateInstance

public Object instantiateInstance()
                           throws Exception
Instantiate an instance of 'setupClass' using my ClassLoader.

Exception

instantiateInstance

protected Object instantiateInstance(ClassLoader cl)
                              throws Exception
Instantiate an instance of 'setupClass' using the given ClassLoader.

Exception

wrapInWindow

public Window wrapInWindow(Object object,
                           PounderPrefs prefs)
                    throws Exception
Wraps the given object in a Window, and places it at the location given in PounderPrefs.

Parameters:
object - May be a Component, Window, or ComponentConduit.
prefs - Will be used to obtain the window location if necessary.
Exception

toString

public String toString()
Overrides:
toString in class Object

toXML

public Element toXML(Document doc)
XML representation of TestInstanceFactory.


equals

public boolean equals(Object o)
Returns true if 'setupClass' is equal.

Overrides:
equals in class Object


Copyright © 2002 Matthew Pekar. All Rights Reserved.