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

LogQueryEntryImplTest

public final class LogQueryEntryImplTest extends TestCase

Fields Summary
private static final String
N1
private static final String
V1
private static final String
N2
private static final String
V2
Constructors Summary
public LogQueryEntryImplTest()

	
Methods Summary
public static com.sun.appserv.management.ext.logging.LogQueryEntryImplcreateDummy()

	    return new LogQueryEntryImpl(
	        0,
	        new Date(),
	        Level.OFF.toString(),
	        "Sun Appserver whatever",
	        "hello world",
	        "MSG01",
            "module",
            nvp(N1,V1) + ";" + nvp(N2,V2) );
	
private static java.lang.Stringnvp(java.lang.String name, java.lang.String value)

	
	      
	       
	
	    return( name + "=" + value );
	
public voidtestCreate()

	    createDummy();
	
public voidtestEquals()

	    final LogQueryEntryImpl d = createDummy();
	    
	    assertEquals( d, d );
	    
	    final LogQueryEntryImpl dCopy = new LogQueryEntryImpl(
    	    d.getRecordNumber(),
    	    d.getDate(),
    	    d.getLevel(),
    	    d.getProductName(),
    	    d.getMessage(),
    	    d.getMessageID(),
    	    d.getModule(),
    	    d.getNameValuePairs() );
    	
    	assertEquals( d, dCopy );
    	assertEquals( dCopy, d );
	
public voidtestGetNameValuePairsMap()

	    final LogQueryEntryImpl d = createDummy();
	    
	    final Map<String,String>    m   = d.getNameValuePairsMap();
	    assertEquals( V1, m.get( N1 ) );
	    assertEquals( V2, m.get( N2 ) );
	
public voidtestGetters()

	    final LogQueryEntryImpl d = createDummy();
	    
	    d.getRecordNumber();
	    d.getDate();
	    d.getLevel();
	    d.getMessage();
	    d.getMessageID();
	    d.getModule();
	    d.getMessage();
	    d.getNameValuePairs();
	    d.getNameValuePairsMap();