mil.dod.th.ose.logging/test/mil/dod/th/ose/logging/TestLogUtil.java
@Test
    public void testFromLogEntryExceptionTraceAtLimit()
    {
        Exception exception = new Exception("Test Exception");
        StackTraceElement[] elementArray = new StackTraceElement[15];
        for (int i=0; i<elementArray.length; i++)
        {
            elementArray[i] = new StackTraceElement("blah", "blah" + (i + 1), "blah.java", i+20);
        }
        exception.setStackTrace(elementArray);
        final String entry = LogUtil.fromLogEntry(LogService.LOG_DEBUG, System.currentTimeMillis(),
                null, null, "test", exception, true);
        AssertUtils.assertSubStringCount(entry, " at ", is(15));
        assertThat(entry, not(containsString(" ... ")));
    }
/**
     * Verify trace has correct number of methods at limit.
     */
Verify trace has correct number of methods at limit.
Verify trace has correct number of methods at limit .
@Test
    public void testFromLogEntryExceptionTraceAtLimit()
    {
        Exception exception = new Exception("Test Exception");
        StackTraceElement[] elementArray = new StackTraceElement[15];
        for (int i=0; i<elementArray.length; i++)
        {
            elementArray[i] = new StackTraceElement("blah", "blah" + (i + 1), "blah.java", i+20);
        }
        exception.setStackTrace(elementArray);
        final String entry = LogUtil.fromLogEntry(LogService.LOG_DEBUG, System.currentTimeMillis(),
                null, null, "test", exception, true);
        AssertUtils.assertSubStringCount(entry, " at ", is(15));
        assertThat(entry, not(containsString(" ... ")));
    }
@ Test public void testFromLogEntryExceptionTraceAtLimit ( ) { Exception exception = new Exception ( "Test Exception" ) ; StackTraceElement [ ] elementArray = new StackTraceElement [ 15 ] ; for ( int i = 0 ; i < elementArray . length ; i ++ ) { elementArray [ i ] = new StackTraceElement ( "blah" , "blah" + ( i + 1 ) , "blah.java" , i + 20 ) ; } exception . setStackTrace ( elementArray ) ; final String entry = LogUtil . fromLogEntry ( LogService . LOG_DEBUG , System . currentTimeMillis ( ) , null , null , "test" , exception , true ) ; AssertUtils . assertSubStringCount ( entry , " at " , is ( 15 ) ) ; assertThat ( entry , not ( containsString ( " ... " ) ) ) ; }
Verify trace has correct number of methods at limit.
Verify trace has correct number of methods at limit .