    1   /***
    2    * JFoxSOAF, Service-Oriented Application Framework
    3    *
    4    * Copyright (C) www.huihoo.org
    5    *
    6    * Distributable under GNU LGPL For more information, please visit:
    7    * http://www.huihoo.org/jfox/jfoxsoaf
    8    */
    9
    10  package org.huihoo.jfox.soaf.services.logging;
    11
    12  import junit.framework.TestCase;
    13
    14  /***
    15   * JUnit test case for the
    16   * {@link org.huihoo.jfox.soaf.services.logging.LoggingServiceImpl).
    17   *
    18   * @author <a href="mailto:founder_chen@yahoo.com">Peter Cheng </a>
    19   * @version $Revision: 1.3 $ $Date: 2004/10/25 08:30:09 $
    20   * @version Revision: 1.0
    21   */
    22
    23  public class LoggingServiceImplTest extends TestCase {
    24
    25      private LoggingServiceImpl log;
    26
    27      /***
    28       * @see TestCase#setUp()
    29       */
    30      protected void setUp() throws Exception {
    31          super.setUp();
    32          log = new LoggingServiceImpl();
    33      }
    34
    35      /***
    36       * Test for method: LoggingServiceImpl()
    37       *
    38       * @see LoggingServiceImpl#LoggingServiceImpl()
    39       */
    40      public void testLoggingServiceImpl() throws Throwable {
    41          LoggingServiceImpl logService = new LoggingServiceImpl();
    42      }
    43
    44      /***
    45       * Test for method: isWarnEnabled()
    46       *
    47       * @see LoggingServiceImpl#isWarnEnabled()
    48       */
    49      public void testIsWarnEnabled1() throws Throwable {
    50          boolean RETVAL = log.isWarnEnabled();
    51          assertEquals(true, RETVAL);
    52      }
    53
    54      /***
    55       * Test for method: isInfoEnabled()
    56       *
    57       * @see LoggingServiceImpl#isInfoEnabled()
    58       */
    59      public void testIsInfoEnabled1() throws Throwable {
    60          boolean RETVAL = log.isInfoEnabled();
    61          assertEquals(true, RETVAL);
    62      }
    63
    64      /***
    65       * Test for method: isDebugEnabled()
    66       *
    67       * @see LoggingServiceImpl#isDebugEnabled()
    68       */
    69      public void testIsDebugEnabled() throws Throwable {
    70          boolean RETVAL = log.isDebugEnabled();
    71          assertEquals(true, RETVAL);
    72      }
    73
    74      /***
    75       * Test for method: isErrorEnabled()
    76       *
    77       * @see LoggingServiceImpl#isErrorEnabled()
    78       */
    79      public void testIsErrorEnabled1() throws Throwable {
    80          boolean RETVAL = log.isErrorEnabled();
    81          assertEquals(true, RETVAL);
    82      }
    83
    84      /***
    85       * Test for method: isFatalEnabled()
    86       *
    87       * @see LoggingServiceImpl#isFatalEnabled()
    88       */
    89      public void testIsFatalEnabled1() throws Throwable {
    90          boolean RETVAL = log.isFatalEnabled();
    91          assertEquals(true, RETVAL);
    92      }
    93
    94      /***
    95       * Test for method: trace(Object)
    96       *
    97       * @see LoggingServiceImpl#trace(Object)
    98       * @author Jtest
    99       */
    100     public void testTrace1() throws Throwable {
    101         log.trace((Object) null);
    102     }
    103
    104     /***
    105      * Test for method: trace(Object)
    106      *
    107      * @see LoggingServiceImpl#trace(Object)
    108      */
    109     public void testTrace2() throws Throwable {
    110         Object obj = new Object();
    111         log.trace(obj);
    112     }
    113
    114     /***
    115      * Test for method: trace(Object,Throwable)
    116      *
    117      * @see LoggingServiceImpl#trace(Object,Throwable)
    118      */
    119     public void testTrace3() throws Throwable {
    120         try {
    121             log.trace((Object) null, new ArithmeticException());
    122         } catch (Throwable e) {
    123         }
    124     }
    125
    126     /***
    127      * Test for method: trace(Object,Throwable)
    128      *
    129      * @see LoggingServiceImpl#trace(Object,Throwable)
    130      * @author Jtest
    131      */
    132     public void testTrace4() throws Throwable {
    133         Object obj = new Object();
    134         try {
    135             log.trace(obj, new ArithmeticException());
    136         } catch (Throwable e) {
    137         }
    138     }
    139
    140     /***
    141      * Test for method: isTraceEnabled()
    142      *
    143      * @see LoggingServiceImpl#isTraceEnabled()
    144      */
    145     public void testIsTraceEnabled1() throws Throwable {
    146         boolean RETVAL = log.isTraceEnabled();
    147         assertEquals(true, RETVAL);
    148     }
    149
    150     /***
    151      * Test for method: warn(Object,Throwable)
    152      *
    153      * @see LoggingServiceImpl#warn(Object,Throwable)
    154      */
    155     public void testWarn1() throws Throwable {
    156         try {
    157             log.warn((Object) null, new ArithmeticException());
    158         } catch (Throwable e) {
    159         }
    160     }
    161
    162     /***
    163      * Test for method: warn(Object,Throwable)
    164      *
    165      * @see LoggingServiceImpl#warn(Object,Throwable)
    166      */
    167     public void testWarn2() throws Throwable {
    168         Object obj = new Object();
    169         try {
    170             log.warn(obj, new ArithmeticException());
    171         } catch (Throwable e) {
    172         }
    173     }
    174
    175     /***
    176      * Test for method: warn(Object)
    177      *
    178      * @see LoggingServiceImpl#warn(Object)
    179      */
    180     public void testWarn3() throws Throwable {
    181         log.warn((Object) null);
    182     }
    183
    184     /***
    185      * Test for method: warn(Object)
    186      *
    187      * @see LoggingServiceImpl#warn(Object)
    188      */
    189     public void testWarn4() throws Throwable {
    190         Object obj = new Object();
    191         log.warn(obj);
    192     }
    193
    194     /***
    195      * Test for method: debug(Object)
    196      *
    197      * @see LoggingServiceImpl#debug(Object)
    198      */
    199     public void testDebug1() {
    200         log.debug((Object) null);
    201     }
    202
    203     /***
    204      * Test for method: debug(Object)
    205      *
    206      * @see LoggingServiceImpl#debug(Object)
    207      */
    208     public void testDebug2() {
    209         Object obj = new Object();
    210         log.debug(obj);
    211     }
    212
    213     /***
    214      * Test for method: debug(Object,Throwable)
    215      *
    216      * @see LoggingServiceImpl#debug(Object,Throwable)
    217      */
    218     public void testDebug3() {
    219         try {
    220             log.debug((Object) null, new ArithmeticException());
    221         } catch (Throwable e) {
    222         }
    223     }
    224
    225     /***
    226      * Test for method: debug(Object,Throwable)
    227      *
    228      * @see LoggingServiceImpl#debug(Object,Throwable)
    229      */
    230     public void testDebug4() throws Throwable {
    231         Object obj = new Object();
    232         try {
    233             log.debug(obj, new ArithmeticException());
    234         } catch (Throwable e) {
    235         }
    236     }
    237
    238     /***
    239      * Test for method: info(Object,Throwable)
    240      *
    241      * @see LoggingServiceImpl#info(Object,Throwable)
    242      */
    243     public void testInfo1() throws Throwable {
    244         try {
    245             log.info((Object) null, new ArithmeticException());
    246         } catch (Throwable e) {
    247         }
    248     }
    249
    250     /***
    251      * Test for method: info(Object,Throwable)
    252      *
    253      * @see LoggingServiceImpl#info(Object,Throwable)
    254      */
    255     public void testInfo2() throws Throwable {
    256         Object obj = new Object();
    257         try {
    258             log.info(obj, new ArithmeticException());
    259         } catch (Throwable e) {
    260         }
    261     }
    262
    263     /***
    264      * Test for method: info(Object)
    265      *
    266      * @see LoggingServiceImpl#info(Object)
    267      */
    268     public void testInfo3() throws Throwable {
    269         log.info((Object) null);
    270     }
    271
    272     /***
    273      * Test for method: info(Object)
    274      *
    275      * @see LoggingServiceImpl#info(Object)
    276      */
    277     public void testInfo4() throws Throwable {
    278         Object obj = new Object();
    279         log.info(obj);
    280     }
    281
    282     /***
    283      * Test for method: error(Object)
    284      *
    285      * @see LoggingServiceImpl#error(Object)
    286      */
    287     public void testError1() throws Throwable {
    288         log.error((Object) null);
    289     }
    290
    291     /***
    292      * Test for method: error(Object)
    293      *
    294      * @see LoggingServiceImpl#error(Object)
    295      */
    296     public void testError2() throws Throwable {
    297         Object obj = new Object();
    298         log.error(obj);
    299     }
    300
    301     /***
    302      * Test for method: error(Object,Throwable)
    303      *
    304      * @see LoggingServiceImpl#error(Object,Throwable)
    305      */
    306     public void testError3() throws Throwable {
    307         try {
    308             log.error((Object) null, new ArithmeticException());
    309         } catch (Throwable e) {
    310         }
    311     }
    312
    313     /***
    314      * Test for method: error(Object,Throwable)
    315      *
    316      * @see LoggingServiceImpl#error(Object,Throwable)
    317      * @author Jtest
    318      */
    319     public void testError4() throws Throwable {
    320         Object obj = new Object();
    321         try {
    322             log.error(obj, new ArithmeticException());
    323         } catch (Throwable e) {
    324         }
    325     }
    326
    327     /***
    328      * Test for method: fatal(Object,Throwable)
    329      *
    330      * @see LoggingServiceImpl#fatal(Object,Throwable)
    331      */
    332     public void testFatal1() throws Throwable {
    333         try {
    334             log.fatal((Object) null, new ArithmeticException());
    335         } catch (Throwable e) {
    336         }
    337     }
    338
    339     /***
    340      * Test for method: fatal(Object,Throwable)
    341      *
    342      * @see LoggingServiceImpl#fatal(Object,Throwable)
    343      */
    344     public void testFatal2() throws Throwable {
    345         Object obj = new Object();
    346         try {
    347             log.fatal(obj, new ArithmeticException());
    348         } catch (Throwable e) {
    349         }
    350     }
    351
    352     /***
    353      * Test for method: fatal(Object)
    354      *
    355      * @see LoggingServiceImpl#fatal(Object)
    356      */
    357     public void testFatal3() throws Throwable {
    358         log.fatal((Object) null);
    359     }
    360
    361     /***
    362      * Test for method: fatal(Object)
    363      *
    364      * @see LoggingServiceImpl#fatal(Object)
    365      */
    366     public void testFatal4() throws Throwable {
    367         Object obj = new Object();
    368         log.fatal(obj);
    369     }
    370
    371 }