FileDocCategorySizeDatePackage
StaticTestTest.javaAPI DocGlassfish v2 API3563Fri May 04 22:24:40 BST 2007com.sun.enterprise.config.serverbeans.validation.tests

StaticTestTest

public class StaticTestTest extends TestCase
author
Rob

Fields Summary
Constructors Summary
public StaticTestTest(String name)

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

        final TestRunner runner= new TestRunner();
        final TestResult result = runner.doRun(StaticTestTest.suite(), false);
        System.exit(result.errorCount() + result.failureCount());
    
protected voidsetUp()

    
public static junit.framework.Testsuite()

        TestSuite suite = new TestSuite(StaticTestTest.class);
        return suite;
    
protected voidtearDown()

    
public voidtestIsClassPathValid()
JUnit test for method isClassPathValid in StaticTest.java. In order to successfully test this method you must set the validPath variables to valid paths on your filesystem.

author
Rob Ruyak

        String validPath = null;
        String invalidPath = "badPath";
        String OS = System.getProperty("os.name");
        if(OS.startsWith("Win")) {  
            validPath = "C:/Sun/appserver8/jdk";
        } else {
            validPath = "/export/appserver8/jdk";
        }
        Assert.assertTrue(StaticTest.classPathCheck);
        Assert.assertTrue(StaticTest.isClassPathValid(validPath));
        Assert.assertFalse(StaticTest.isClassPathValid(invalidPath));