Package com.dianping.cat.config

Examples of com.dianping.cat.config.Format


  @Rule
  public ExpectedException exception = ExpectedException.none();

  @Test
  public void TestParse() throws ParseException {
    Format format = new DefaultFormat();
    format.setPattern("*");
    assertEquals("balabala", format.parse("balabala"));
    format.setPattern("id");
    assertEquals("{id}", format.parse("balabala"));
    format.setPattern("md5:2");
    assertEquals("{md5:2}", format.parse("b2"));
    exception.expect(ParseException.class);
    format.parse("hello");
    format.parse("Ad");
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.config.Format

Copyright © 2018 www.massapicom. 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.