use of com.navercorp.pinpoint.bootstrap.instrument.matcher.operator.OrMatcherOperator in project pinpoint by naver.
the class DefaultMultiClassBasedMatcherTest method getMatcherOperandWithMultiClassName.
@Test
public void getMatcherOperandWithMultiClassName() {
// (class OR class)
DefaultMultiClassBasedMatcher matcher = new DefaultMultiClassBasedMatcher(Arrays.asList("java.lang.String", "java.lang.Thread"));
assertTrue(matcher.getBaseClassNames().contains("java.lang.String"));
assertTrue(matcher.getBaseClassNames().contains("java.lang.Thread"));
MatcherOperand operand = matcher.getMatcherOperand();
assertTrue(operand instanceof OrMatcherOperator);
OrMatcherOperator operator = (OrMatcherOperator) operand;
assertTrue(operator.getLeftOperand() instanceof ClassInternalNameMatcherOperand);
ClassInternalNameMatcherOperand leftOperand = (ClassInternalNameMatcherOperand) operator.getLeftOperand();
assertEquals("java/lang/String", leftOperand.getClassInternalName());
assertTrue(operator.getRightOperand() instanceof ClassInternalNameMatcherOperand);
ClassInternalNameMatcherOperand rightOperand = (ClassInternalNameMatcherOperand) operator.getRightOperand();
assertEquals("java/lang/Thread", rightOperand.getClassInternalName());
}
Aggregations