aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/helper/LogTest.java
blob: ef33c32ba9f3a18847964ec6fd81e33158c5c295 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.traccar.helper;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class LogTest {
    
    @Test
    public void testExceptionStack() {
        assertEquals(
                "test - Exception (LogTest:11 < ...)",
                Log.exceptionStack(new Exception("test")));
    }

    @Test
    public void testExceptionStackRootCause() {
        assertEquals(
                "root - Exception (LogTest:18 < ...)",
                Log.exceptionStack(new Exception("test", new Exception("root"))));
    }

}