assertTrue(cut.picks(equals));
assertFalse(cut.picks(subFooMethod));
}
public void testCustomClassPointcuts() {
ClassPointcut picksFoo = new ClassPointcut() {
public boolean picks(Class clazz) {
return clazz.equals(Foo.class);
}
};
ClassPointcut picksBar = new ClassPointcut() {
public boolean picks(Class clazz) {
return clazz.equals(Bar.class);
}
};
ClassPointcut cut = cuts.union(picksFoo, picksBar);
assertTrue(cut.picks(Foo.class));
assertTrue(cut.picks(Bar.class));
assertFalse(cut.picks(FooBar.class));
}