mil.dod.th.ose.logging/test/mil/dod/th/ose/logging/TestLogUtil.java
@Test
    public void testConvertOsgiToNativeLevel()
    {
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_DEBUG), is(LogLevel.Debug));
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_INFO), is(LogLevel.Info));
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_WARNING), is(LogLevel.Warning));
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_ERROR), is(LogLevel.Error));
        
        try
        {
            LogUtil.convertOsgiToNativeLevel(-1);
            fail("Expected exception due to invalid value");
        }
        catch (IllegalArgumentException e)
        {
            
        }
    }
/**
     * Verify an OSGi log level can be converted to a native level.
     */
Verify an OSGi log level can be converted to a native level.
Verify an OSGi log level can be converted to a native level .
@Test
    public void testConvertOsgiToNativeLevel()
    {
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_DEBUG), is(LogLevel.Debug));
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_INFO), is(LogLevel.Info));
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_WARNING), is(LogLevel.Warning));
        assertThat(LogUtil.convertOsgiToNativeLevel(LogService.LOG_ERROR), is(LogLevel.Error));
        try
        {
            LogUtil.convertOsgiToNativeLevel(-1);
            fail("Expected exception due to invalid value");
        }
        catch (IllegalArgumentException e)
        {
        }
    }
@ Test public void testConvertOsgiToNativeLevel ( ) { assertThat ( LogUtil . convertOsgiToNativeLevel ( LogService . LOG_DEBUG ) , is ( LogLevel . Debug ) ) ; assertThat ( LogUtil . convertOsgiToNativeLevel ( LogService . LOG_INFO ) , is ( LogLevel . Info ) ) ; assertThat ( LogUtil . convertOsgiToNativeLevel ( LogService . LOG_WARNING ) , is ( LogLevel . Warning ) ) ; assertThat ( LogUtil . convertOsgiToNativeLevel ( LogService . LOG_ERROR ) , is ( LogLevel . Error ) ) ; try { LogUtil . convertOsgiToNativeLevel ( - 1 ) ; fail ( "Expected exception due to invalid value" ) ; } catch ( IllegalArgumentException e ) { } }
Verify an OSGi log level can be converted to a native level.
Verify an OSGi log level can be converted to a native level .