View Javadoc
1   package ch.qos.logback.core.model.processor;
2   
3   import org.junit.jupiter.api.Test;
4   
5   import ch.qos.logback.core.Context;
6   import ch.qos.logback.core.ContextBase;
7   
8   import static org.junit.jupiter.api.Assertions.assertEquals;
9   import static org.junit.jupiter.api.Assertions.assertNull;
10  
11  public class ImportModelHandlerTest {
12  
13      Context context = new ContextBase();
14      ImportModelHandler imh = new ImportModelHandler(context);
15  
16      @Test
17      public void testStemExtraction() {
18          assertNull(imh.extractStem(null));
19          assertNull(imh.extractStem(""));
20          assertNull(imh.extractStem("bla."));
21          assertEquals("Foo", imh.extractStem("bla.Foo"));
22          assertEquals("Foo", imh.extractStem("com.titi.bla.Foo"));
23  
24      }
25  
26  }