Move the FormulaEvaluator code out of scratchpad
[poi.git] / src / testcases / org / apache / poi / util / TestPOILogFactory.java
blob27fddabeac27d1ffb1468a4b3fffd9d5970e9634
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;
26 /**
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
33 extends TestCase
35 /**
36 * Creates new TestPOILogFactory
38 * @param name
41 public TestPOILogFactory( String name )
43 super( name );
46 /**
47 * test log creation
49 * @exception IOException
52 public void testLog()
53 throws IOException
55 //NKB Testing only that logging classes use gives no exception
56 // Since logging can be disabled, no checking of logging
57 // output is done.
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" );
76 /**
77 * main method to run the unit tests
79 * @param ignored_args
82 public static void main( String[] ignored_args )
84 System.out.println( "Testing basic util.POILogFactory functionality" );
85 junit.textui.TestRunner.run( TestPOILogFactory.class );