Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junit.extensions.abbot
Class ComponentTestFixture  view ComponentTestFixture download ComponentTestFixture.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byjunit.extensions.abbot.ComponentTestFixture
All Implemented Interfaces:
junit.framework.Test

public class ComponentTestFixture
extends junit.framework.TestCase

Simple wrapper for testing components under JUnit. Derived classes provide a component which is placed within a frame and displayed prior to each test.


Field Summary
private  boolean opened
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
ComponentTestFixture(java.lang.String name)
          Construct a test case with the given name.
 
Method Summary
protected  abbot.ComponentFinder getFinder()
          Obtain a component finder to look up components.
protected  void runTest()
          Override the default TestCase runTest method to ensure components are cleaned up after the test.
protected  java.awt.Frame showFrame(java.awt.Component comp)
          This method should be invoked to display the component under test.
protected  java.awt.Frame showFrame(java.awt.Component comp, java.awt.Dimension size)
          This method should be invoked to display the component under test, when a specific size of frame is desired.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

opened

private volatile boolean opened
Constructor Detail

ComponentTestFixture

public ComponentTestFixture(java.lang.String name)
Construct a test case with the given name.

Method Detail

showFrame

protected java.awt.Frame showFrame(java.awt.Component comp)
This method should be invoked to display the component under test. The frame's size will be its preferred size.


showFrame

protected java.awt.Frame showFrame(java.awt.Component comp,
                                   java.awt.Dimension size)
This method should be invoked to display the component under test, when a specific size of frame is desired.


getFinder

protected abbot.ComponentFinder getFinder()
Obtain a component finder to look up components.


runTest

protected void runTest()
                throws java.lang.Throwable
Override the default TestCase runTest method to ensure components are cleaned up after the test.