mil.dod.th.ose.logging/test/mil/dod/th/ose/logging/TestLogWriter.java
@Test
    public void testActivateBadInitialLogLevel()
    {
        BundleContext context = mock(BundleContext.class);
        Map<String, Object> props = new HashMap<String, Object>(getComponentProperties());
        when(context.getProperty(LogWriter.LOG_LEVEL_PROPERTY)).thenReturn("moooooooooo");
        m_SUT.activate(context, props);
        // This is to mimic the log file created during activation.
        setUpFileNaming();

        m_SUT.deactivate();
    }
/**
     * Test that activation with improperly spelled initial log level.
     * Verify that the log writer still activates.
     */
Test that activation with improperly spelled initial log level.
Verify that the log writer still activates.
Test that activation with improperly spelled initial log level . Verify that the log writer still activates .
@Test
    public void testActivateBadInitialLogLevel()
    {
        BundleContext context = mock(BundleContext.class);
        Map<String, Object> props = new HashMap<String, Object>(getComponentProperties());
        when(context.getProperty(LogWriter.LOG_LEVEL_PROPERTY)).thenReturn("moooooooooo");
        m_SUT.activate(context, props);
        setUpFileNaming();
        m_SUT.deactivate();
    }
@ Test public void testActivateBadInitialLogLevel ( ) { BundleContext context = mock ( BundleContext . class ) ; Map < String , Object > props = new HashMap < String , Object > ( getComponentProperties ( ) ) ; when ( context . getProperty ( LogWriter . LOG_LEVEL_PROPERTY ) ) . thenReturn ( "moooooooooo" ) ; m_SUT . activate ( context , props ) ; setUpFileNaming ( ) ; m_SUT . deactivate ( ) ; }
Test that activation with improperly spelled initial log level.
Test that activation with improperly spelled initial log level .
// This is to mimic the log file created during activation.