aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/helper/LogTest.java
blob: a264896b50e78c384d64d3bf7fbff3ea02bfe6af (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.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.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"))));
    }

}