1 2 17 18 19 package org.apache.poi.util; 20 21 import junit.framework.TestCase; 22 23 30 31 public class TestPOILogger 32 extends TestCase 33 { 34 41 42 public TestPOILogger( String s ) 43 { 44 super( s ); 45 } 46 47 52 public void testVariousLogTypes() 53 throws Exception 54 { 55 59 POILogger log = POILogFactory.getLogger( "foo" ); 60 61 log.log( POILogger.WARN, "Test = ", new Integer ( 1 ) ); 62 log.logFormatted( POILogger.ERROR, "Test param 1 = %, param 2 = %", "2", new Integer ( 3 ) ); 63 log.logFormatted( POILogger.ERROR, "Test param 1 = %, param 2 = %", new int[]{4, 5} ); 64 log.logFormatted( POILogger.ERROR, 65 "Test param 1 = %1.1, param 2 = %0.1", new double[]{4, 5.23} ); 66 67 } 68 } 69 | Popular Tags |