View Javadoc
1   package ch.qos.logback.classic;
2   
3   import static org.junit.Assert.assertEquals;
4   
5   import org.junit.Test;
6   
7   public class LevelTest {
8   
9       
10      
11      @Test
12      public void smoke( ) {
13          assertEquals(Level.TRACE, Level.toLevel("TRACE"));
14          assertEquals(Level.DEBUG, Level.toLevel("DEBUG"));
15          assertEquals(Level.INFO, Level.toLevel("INFO"));
16          assertEquals(Level.WARN, Level.toLevel("WARN"));
17          assertEquals(Level.ERROR, Level.toLevel("ERROR"));
18      }
19      
20      @Test
21      public void withSpaceSuffix( ) {
22          assertEquals(Level.INFO, Level.toLevel("INFO "));
23      }
24  }