2 /* ====================================================================
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================== */
20 package org
.apache
.poi
.util
;
22 import junit
.framework
.TestCase
;
24 import java
.io
.IOException
;
27 * @author Marc Johnson (mjohnson at apache dot org)
28 * @author Glen Stampoultzis (glens at apache.org)
29 * @author Nicola Ken Barozzi (nicolaken at apache.org)
32 public class TestPOILogFactory
36 * Creates new TestPOILogFactory
41 public TestPOILogFactory( String name
)
49 * @exception IOException
55 //NKB Testing only that logging classes use gives no exception
56 // Since logging can be disabled, no checking of logging
59 POILogger l1
= POILogFactory
.getLogger( "org.apache.poi.hssf.test" );
60 POILogger l2
= POILogFactory
.getLogger( "org.apache.poi.hdf.test" );
62 l1
.log( POILogger
.FATAL
, "testing cat org.apache.poi.hssf.*:FATAL" );
63 l1
.log( POILogger
.ERROR
, "testing cat org.apache.poi.hssf.*:ERROR" );
64 l1
.log( POILogger
.WARN
, "testing cat org.apache.poi.hssf.*:WARN" );
65 l1
.log( POILogger
.INFO
, "testing cat org.apache.poi.hssf.*:INFO" );
66 l1
.log( POILogger
.DEBUG
, "testing cat org.apache.poi.hssf.*:DEBUG" );
68 l2
.log( POILogger
.FATAL
, "testing cat org.apache.poi.hdf.*:FATAL" );
69 l2
.log( POILogger
.ERROR
, "testing cat org.apache.poi.hdf.*:ERROR" );
70 l2
.log( POILogger
.WARN
, "testing cat org.apache.poi.hdf.*:WARN" );
71 l2
.log( POILogger
.INFO
, "testing cat org.apache.poi.hdf.*:INFO" );
72 l2
.log( POILogger
.DEBUG
, "testing cat org.apache.poi.hdf.*:DEBUG" );
77 * main method to run the unit tests
82 public static void main( String
[] ignored_args
)
84 System
.out
.println( "Testing basic util.POILogFactory functionality" );
85 junit
.textui
.TestRunner
.run( TestPOILogFactory
.class );