FileDocCategorySizeDatePackage
ValidPropertyTest.javaAPI DocGlassfish v2 API3821Fri May 04 22:25:30 BST 2007com.sun.enterprise.cli.framework

ValidPropertyTest

public class ValidPropertyTest extends TestCase
author
Toby H Ferguson
version
$Revision: 1.5 $

Fields Summary
Constructors Summary
public ValidPropertyTest(String name)

        super(name);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        if (args.length == 0){
            junit.textui.TestRunner.run(ValidPropertyTest.class);
        } else {
            junit.textui.TestRunner.run(makeSuite(args));
        }
    
private static junit.framework.TestSuitemakeSuite(java.lang.String[] args)

        final TestSuite ts = new TestSuite();
        for (int i = 0; i < args.length; i++){
            ts.addTest(new ValidPropertyTest(args[i]));
        }
        return ts;
    
private voidnyi()

        fail("Not Yet Implemented");
    
protected voidsetUp()

    
protected voidtearDown()

    
public voidtestEmptyConstructor()

        ValidProperty vp = new ValidProperty();
        assertNull(vp.getName());
    
public voidtestNameMutation()

        ValidProperty vp = new ValidProperty("name", "value");
        assertEquals("name", vp.getName());
        assertEquals("value", vp.getValue());
        vp.setName("foo");
        assertEquals("foo", vp.getName());
        assertEquals("value", vp.getValue());
    
public voidtestSimpleConstructor()

        ValidProperty vp = new ValidProperty("name", "value");
        assertEquals("name", vp.getName());
        assertEquals("value", vp.getValue());
    
public voidtestValueMutation()

        ValidProperty vp = new ValidProperty("name", "value");
        assertEquals("name", vp.getName());
        assertEquals("value", vp.getValue());
        vp.setValue("foo");
        assertEquals("foo", vp.getValue());
        assertEquals("name", vp.getName());