use of com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut.ClassName in project newrelic-java-agent by newrelic.
the class ExtensionConversionUtilityTest method createClassMatcher.
@Test
public void createClassMatcher() throws XmlException {
Pointcut pointcut = new Pointcut();
ClassName name = new ClassName();
name.setValue(ArrayList.class.getName());
pointcut.setClassName(name);
ClassMatcher classMatcher = ExtensionConversionUtility.createClassMatcher(pointcut, "test");
Assert.assertTrue(classMatcher instanceof ExactClassMatcher);
Assert.assertTrue(classMatcher.isMatch(ArrayList.class));
}
use of com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut.ClassName in project newrelic-java-agent by newrelic.
the class ReinstrumentUtilsTest method setClassName.
private static void setClassName(Pointcut pc, Class clazz) {
ClassName name = new ClassName();
name.setValue(clazz.getName());
pc.setClassName(name);
}
use of com.newrelic.agent.extension.beans.Extension.Instrumentation.Pointcut.ClassName in project newrelic-java-agent by newrelic.
the class ExtensionConversionUtilityTest method createClassMatcher_empty.
@Test(expected = XmlException.class)
public void createClassMatcher_empty() throws XmlException {
Pointcut pointcut = new Pointcut();
ClassName name = new ClassName();
name.setValue(ArrayList.class.getName());
ExtensionConversionUtility.createClassMatcher(pointcut, "test");
}
Aggregations