Package ch.qos.logback.classic.pattern

Examples of ch.qos.logback.classic.pattern.TargetLengthBasedClassNameAbbreviator.abbreviate()


  @Test
  public void testShortName() {
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(100);
      String name = "hello";
      assertEquals(name, abbreviator.abbreviate(name));
    }
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(100);
      String name = "hello.world";
      assertEquals(name, abbreviator.abbreviate(name));
View Full Code Here


      assertEquals(name, abbreviator.abbreviate(name));
    }
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(100);
      String name = "hello.world";
      assertEquals(name, abbreviator.abbreviate(name));
    }
  }

  @Test
  public void testNoDot() {
View Full Code Here

  @Test
  public void testNoDot() {
    TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
    String name = "hello";
    assertEquals(name, abbreviator.abbreviate(name));
  }

  @Test
  public void testOneDot() {
    {
View Full Code Here

  @Test
  public void testOneDot() {
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "hello.world";
      assertEquals("h.world", abbreviator.abbreviate(name));
    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "h.world";
View Full Code Here

    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "h.world";
      assertEquals("h.world", abbreviator.abbreviate(name));
    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = ".world";
View Full Code Here

    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = ".world";
      assertEquals(".world", abbreviator.abbreviate(name));
    }
  }

  @Test
  public void testTwoDot() {
View Full Code Here

  @Test
  public void testTwoDot() {
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "com.logback.Foobar";
      assertEquals("c.l.Foobar", abbreviator.abbreviate(name));
    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "c.logback.Foobar";
View Full Code Here

    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "c.logback.Foobar";
      assertEquals("c.l.Foobar", abbreviator.abbreviate(name));
    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "c..Foobar";
View Full Code Here

    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "c..Foobar";
      assertEquals("c..Foobar", abbreviator.abbreviate(name));
    }
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "..Foobar";
      assertEquals("..Foobar", abbreviator.abbreviate(name));
View Full Code Here

      assertEquals("c..Foobar", abbreviator.abbreviate(name));
    }
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "..Foobar";
      assertEquals("..Foobar", abbreviator.abbreviate(name));
    }
  }
 
  @Test
  public void test3Dot() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.