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

Quick Search    Search Deep

abbot
Class DefaultComponentFinderTest  view DefaultComponentFinderTest download DefaultComponentFinderTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byabbot.DefaultComponentFinderTest
All Implemented Interfaces:
junit.framework.Test

public class DefaultComponentFinderTest
extends junit.framework.TestCase

Verify we can generate and look up components in a wide variety of GUI configurations. Note that this tests the ComponentReference ctor as well, since the two classes work closely together.


Field Summary
private  DefaultComponentFinder finder
           
private  test.AbbotHelper helper
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
DefaultComponentFinderTest(java.lang.String name)
           
 
Method Summary
private  javax.swing.JButton findButton(java.awt.Component c)
           
static void main(java.lang.String[] args)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 void testCanFindJOptionPane()
          Test to see if a JOptionPane and be located
 void testCanFindJTextField()
          Test to ensure that JTextFields can be found.
 void testDuplicateJOptionPanes()
          Ensure that find window works with JOptionPane-generated components.
 void testFindDialogs()
          Ensure we can find sub-dialogs.
 void testGetComponentName()
          Test that unamed components have the correct default value for their name
 void testIdenticalCousins()
          Verify two identical cousin (sibling parents) components can be distinguished.
 void testIdenticalLabelGroup()
          Test to ensure that index can be used on otherwise indistingushable components
 void testIdenticalSiblings()
          Verify two identical sibling components can be distinguished.
 void testNullParentDialog()
          Ensure we can find dialogs/windows with a null parent.
 void testSiblings()
          Test to see if the label and index can identify a component
 void testSubsequentDialogContentsLookup()
          Component reference matching one dialog should match an identical subsequent one.
 void testTwoNamedButtons()
          Test to see if two buttons which are identical except for their name and index can be found
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

helper

private test.AbbotHelper helper

finder

private DefaultComponentFinder finder
Constructor Detail

DefaultComponentFinderTest

public DefaultComponentFinderTest(java.lang.String name)
Method Detail

testSiblings

public void testSiblings()
Test to see if the label and index can identify a component


testIdenticalSiblings

public void testIdenticalSiblings()
Verify two identical sibling components can be distinguished.


testIdenticalCousins

public void testIdenticalCousins()
Verify two identical cousin (sibling parents) components can be distinguished.


testTwoNamedButtons

public void testTwoNamedButtons()
Test to see if two buttons which are identical except for their name and index can be found


testIdenticalLabelGroup

public void testIdenticalLabelGroup()
Test to ensure that index can be used on otherwise indistingushable components


testCanFindJOptionPane

public void testCanFindJOptionPane()
Test to see if a JOptionPane and be located


testCanFindJTextField

public void testCanFindJTextField()
Test to ensure that JTextFields can be found.


testFindDialogs

public void testFindDialogs()
Ensure we can find sub-dialogs.


testNullParentDialog

public void testNullParentDialog()
Ensure we can find dialogs/windows with a null parent.


testGetComponentName

public void testGetComponentName()
Test that unamed components have the correct default value for their name


testDuplicateJOptionPanes

public void testDuplicateJOptionPanes()
Ensure that find window works with JOptionPane-generated components.


findButton

private javax.swing.JButton findButton(java.awt.Component c)

testSubsequentDialogContentsLookup

public void testSubsequentDialogContentsLookup()
                                        throws java.lang.Throwable
Component reference matching one dialog should match an identical subsequent one.


setUp

protected void setUp()
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


tearDown

protected void tearDown()
Description copied from class: junit.framework.TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.


main

public static void main(java.lang.String[] args)