FileDocCategorySizeDatePackage
StatefulLoggingHelperTest.javaAPI DocGlassfish v2 API3702Fri May 04 22:24:04 BST 2007com.sun.enterprise.management.ext.logging

StatefulLoggingHelperTest

public final class StatefulLoggingHelperTest extends com.sun.enterprise.management.AMXTestBase
Test the StatefulLoggingHelper.

Fields Summary
Constructors Summary
public StatefulLoggingHelperTest()

	
Methods Summary
public com.sun.appserv.management.helper.StatefulLoggingHelpercreateHelper(com.sun.appserv.management.ext.logging.Logging logging)

	    return new StatefulLoggingHelper( logging );
	
final java.util.SetgetAllLogging()

	    return getQueryMgr().queryJ2EETypeSet( XTypes.LOGGING );
	
public voidtestCreate()

	    final Set<Logging>  loggings    = getAllLogging();
	    
	    for( final Logging logging : loggings )
	    {
	        assert( createHelper(logging) != null );
	    }
	
public voidtestQuery()

	    final long  start   = now();
	    
	    final Set<Logging>  loggings    = getAllLogging();
	    
	    for( final Logging logging : loggings )
	    {
	        assert( logging != null );
    	    final StatefulLoggingHelper helper  = createHelper(logging);
    	    
    	    final LogQueryResult    result  = helper.query();
    	    validateResult( result );
	    }
	    
	    printElapsed( "testQuery", start);
	
private voidvalidateResult(com.sun.appserv.management.ext.logging.LogQueryResult result)

	    assert( result != null );
	    assert( result.getFieldNames() != null );
	    assert( result.getEntries() != null );