example
Class CelsiusConverterTest

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

public class CelsiusConverterTest
extends ComponentTestFixture

Demonstrates testing a simple Swing UI (CelsiusConverter) with Abbot.

Version:
$Id: CelsiusConverterTest.java 1597 2005-05-06 23:27:16Z tlroche $
Author:
Satadip Dutta (original), Tom Roche (ported to new-style Abbot, added more tests)

Nested Class Summary
 
Nested classes/interfaces inherited from class junit.extensions.abbot.ComponentTestFixture
ComponentTestFixture.ComponentMatcher, ComponentTestFixture.EventDispatchException
 
Field Summary
(package private) static int DEFAULT_PRECISION
           
(package private) static int PRECISION2
           
(package private) static int PRECISION3
           
 
Fields inherited from class junit.extensions.abbot.ComponentTestFixture
DISPOSE_CLASSES, EVENT_GENERATION_DELAY, POPUP_DELAY, WINDOW_DELAY
 
Constructor Summary
CelsiusConverterTest(String name)
          For older versions of JUnit.
 
Method Summary
static void main(String[] args)
           
protected  void setUp()
           
 void testBadInput()
           
 void testChangePrecision()
           
 void testHighPrecision()
           
 void testNegativeNumber()
           
 
Methods inherited from class junit.extensions.abbot.ComponentTestFixture
createHierarchy, disposeAll, disposeWindow, fixtureSetUp, fixtureTearDown, getFinder, getHierarchy, getRobot, getWindowTracker, hideWindow, installPopup, invokeAndWait, invokeLater, isShowing, runBare, setModifiers, showFrame, showFrame, showModalDialog, showModalDialog, showPopup, showPopup, showWindow, showWindow, showWindow, sleep, waitForWindow
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, 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

DEFAULT_PRECISION

static final int DEFAULT_PRECISION
See Also:
Constant Field Values

PRECISION2

static final int PRECISION2
See Also:
Constant Field Values

PRECISION3

static final int PRECISION3
See Also:
Constant Field Values
Constructor Detail

CelsiusConverterTest

public CelsiusConverterTest(String name)
For older versions of JUnit.

Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class TestCase
Throws:
Exception

testNegativeNumber

public void testNegativeNumber()
                        throws Exception
Throws:
Exception

testBadInput

public void testBadInput()
                  throws Exception
Throws:
Exception

testChangePrecision

public void testChangePrecision()
                         throws Exception
Throws:
Exception

testHighPrecision

public void testHighPrecision()
                       throws Exception
Throws:
Exception

main

public static void main(String[] args)


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge