1 2 17 18 19 package org.apache.poi.util; 20 21 import junit.framework.TestCase; 22 23 import java.io.IOException ; 24 25 30 31 public class TestPOILogFactory 32 extends TestCase 33 { 34 39 40 public TestPOILogFactory( String name ) 41 { 42 super( name ); 43 } 44 45 50 51 public void testLog() 52 throws IOException 53 { 54 58 POILogger l1 = POILogFactory.getLogger( "org.apache.poi.hssf.test" ); 59 POILogger l2 = POILogFactory.getLogger( "org.apache.poi.hdf.test" ); 60 61 l1.log( POILogger.FATAL, "testing cat org.apache.poi.hssf.*:FATAL" ); 62 l1.log( POILogger.ERROR, "testing cat org.apache.poi.hssf.*:ERROR" ); 63 l1.log( POILogger.WARN, "testing cat org.apache.poi.hssf.*:WARN" ); 64 l1.log( POILogger.INFO, "testing cat org.apache.poi.hssf.*:INFO" ); 65 l1.log( POILogger.DEBUG, "testing cat org.apache.poi.hssf.*:DEBUG" ); 66 67 l2.log( POILogger.FATAL, "testing cat org.apache.poi.hdf.*:FATAL" ); 68 l2.log( POILogger.ERROR, "testing cat org.apache.poi.hdf.*:ERROR" ); 69 l2.log( POILogger.WARN, "testing cat org.apache.poi.hdf.*:WARN" ); 70 l2.log( POILogger.INFO, "testing cat org.apache.poi.hdf.*:INFO" ); 71 l2.log( POILogger.DEBUG, "testing cat org.apache.poi.hdf.*:DEBUG" ); 72 73 } 74 75 80 81 public static void main( String [] ignored_args ) 82 { 83 System.out.println( "Testing basic util.POILogFactory functionality" ); 84 junit.textui.TestRunner.run( TestPOILogFactory.class ); 85 } 86 } 87 | Popular Tags |