FileDocCategorySizeDatePackage
TestUtilComponent.javaAPI DocExample11836Sat Nov 16 13:03:30 GMT 2002com.oreilly.javaxp.junit

TestUtilComponent

public class TestUtilComponent extends TestCase
author
Eric M. Burke
version
$Id: TestUtilComponent.java,v 1.1 2002/11/16 20:03:31 jepc Exp $

Fields Summary
private int
testNumber
private static final TestData[]
TESTS
Constructors Summary
public TestUtilComponent(String testMethodName, int testNumber)


         
        super(testMethodName);
        this.testNumber = testNumber;
    
Methods Summary
public static junit.framework.Testsuite()

        TestSuite suite = new TestSuite();
        for (int i=0; i<TESTS.length; i++) {
            suite.addTest(new TestUtilComponent("testFieldBackgroundColor", i));
        }
        return suite;
    
public voidtestFieldBackgroundColor()

        TestData td = TESTS[this.testNumber];

        Color actualColor = UtilComponent.getFieldBackground(td.screenMode,
                td.fieldType, td.valid, td.requiredConditionMet);

        assertEquals("Test number " + this.testNumber + ": ",
                UtilComponent.colorToString(td.expectedColor),
                UtilComponent.colorToString(actualColor));