mil.dod.th.core/test/mil/dod/th/core/log/TestStaticLogging.java
@Test
    public final void testLogIntStringObjectArray()
    {
        // replay
        m_SUT.setLogService(null);
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello"), is(false));
        
        // mock
        LogService logService = mock(LogService.class);
        m_SUT.setLogService(logService);
        
        // replay
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello"), is(true));
        
        // verify
        verify(logService).log(LogService.LOG_DEBUG, "!hello");
        
        // replay
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello %s what is up %d", "some", 4), is(true));
        
        // verify
        verify(logService).log(LogService.LOG_DEBUG, "!hello some what is up 4");
        
        m_SUT.unsetLogService(logService);
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello"), is(false));
    }
/**
     * Verify that the logging service can log permutations of messages.
     * Verify that if the LogService is not set that messages cannot be logged.
     */
Verify that the logging service can log permutations of messages.
Verify that if the LogService is not set that messages cannot be logged.
Verify that the logging service can log permutations of messages . Verify that if the LogService is not set that messages cannot be logged .
@Test
    public final void testLogIntStringObjectArray()
    {
        m_SUT.setLogService(null);
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello"), is(false));
        LogService logService = mock(LogService.class);
        m_SUT.setLogService(logService);
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello"), is(true));
        verify(logService).log(LogService.LOG_DEBUG, "!hello");
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello %s what is up %d", "some", 4), is(true));
        verify(logService).log(LogService.LOG_DEBUG, "!hello some what is up 4");
        m_SUT.unsetLogService(logService);
        assertThat(Logging.log(LogService.LOG_DEBUG, "hello"), is(false));
    }
@ Test public final void testLogIntStringObjectArray ( ) { m_SUT . setLogService ( null ) ; assertThat ( Logging . log ( LogService . LOG_DEBUG , "hello" ) , is ( false ) ) ; LogService logService = mock ( LogService . class ) ; m_SUT . setLogService ( logService ) ; assertThat ( Logging . log ( LogService . LOG_DEBUG , "hello" ) , is ( true ) ) ; verify ( logService ) . log ( LogService . LOG_DEBUG , "!hello" ) ; assertThat ( Logging . log ( LogService . LOG_DEBUG , "hello %s what is up %d" , "some" , 4 ) , is ( true ) ) ; verify ( logService ) . log ( LogService . LOG_DEBUG , "!hello some what is up 4" ) ; m_SUT . unsetLogService ( logService ) ; assertThat ( Logging . log ( LogService . LOG_DEBUG , "hello" ) , is ( false ) ) ; }
Verify that the logging service can log permutations of messages.
Verify that the logging service can log permutations of messages .
// replay // mock // replay // verify // replay // verify