Search in sources :

Example 6 with ApiDescription

use of com.navercorp.pinpoint.common.util.ApiDescription in project pinpoint by naver.

the class ApiDescriptionParserTest method parseNoPackage.

@Test
public void parseNoPackage() {
    String api = "StandardHostValve.invoke(Request request, Response response)";
    ApiDescription result = apiParser.parse(api);
    Assert.assertEquals("StandardHostValve", result.getClassName());
    Assert.assertEquals("StandardHostValve", result.getSimpleClassName());
    Assert.assertEquals("", result.getPackageNameName());
    Assert.assertEquals("invoke", result.getMethodName());
    Assert.assertEquals("invoke(Request request, Response response)", result.getSimpleMethodDescription());
    Assert.assertEquals("StandardHostValve", result.getSimpleClassName());
    Assert.assertArrayEquals(new String[] { "Request request", "Response response" }, result.getSimpleParameter());
}
Also used : ApiDescription(com.navercorp.pinpoint.common.util.ApiDescription) Test(org.junit.Test)

Aggregations

ApiDescription (com.navercorp.pinpoint.common.util.ApiDescription)6 Test (org.junit.Test)4 AnnotationBo (com.navercorp.pinpoint.common.server.bo.AnnotationBo)1 ApiMetaDataBo (com.navercorp.pinpoint.common.server.bo.ApiMetaDataBo)1 AnnotationKey (com.navercorp.pinpoint.common.trace.AnnotationKey)1 DefaultApiDescription (com.navercorp.pinpoint.common.util.DefaultApiDescription)1