Package org.nanocontainer.aop

Examples of org.nanocontainer.aop.MethodPointcut.picks()


    public void testReturnType() {
        MethodPointcut cut = cuts.returnType(cuts.oneClass(String.class));
        assertTrue(cut.picks(getA));
        assertTrue(cut.picks(getB));
        assertFalse(cut.picks(isA));
        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
View Full Code Here


    public void testReturnType() {
        MethodPointcut cut = cuts.returnType(cuts.oneClass(String.class));
        assertTrue(cut.picks(getA));
        assertTrue(cut.picks(getB));
        assertFalse(cut.picks(isA));
        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
        assertFalse(cut.picks(banana));
View Full Code Here

        MethodPointcut cut = cuts.returnType(cuts.oneClass(String.class));
        assertTrue(cut.picks(getA));
        assertTrue(cut.picks(getB));
        assertFalse(cut.picks(isA));
        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }
View Full Code Here

        assertTrue(cut.picks(getA));
        assertTrue(cut.picks(getB));
        assertFalse(cut.picks(isA));
        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }
View Full Code Here

        assertTrue(cut.picks(getB));
        assertFalse(cut.picks(isA));
        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }

    public void testMethodPointcutIntersection() {
View Full Code Here

        assertFalse(cut.picks(isA));
        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }

    public void testMethodPointcutIntersection() {
        MethodPointcut a = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(apricot));
View Full Code Here

        assertFalse(cut.picks(isB));
        assertFalse(cut.picks(setA));
        assertFalse(cut.picks(setB));
        assertFalse(cut.picks(apple));
        assertFalse(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }

    public void testMethodPointcutIntersection() {
        MethodPointcut a = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(apricot));
        MethodPointcut b = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(banana));
View Full Code Here

    public void testMethodPointcutIntersection() {
        MethodPointcut a = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(apricot));
        MethodPointcut b = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(banana));
        MethodPointcut c = cuts.intersection(a, b);

        assertTrue(c.picks(apple));
        assertFalse(c.picks(apricot));
        assertFalse(c.picks(banana));
    }

    public void testMethodPointcutNot() {
View Full Code Here

        MethodPointcut a = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(apricot));
        MethodPointcut b = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(banana));
        MethodPointcut c = cuts.intersection(a, b);

        assertTrue(c.picks(apple));
        assertFalse(c.picks(apricot));
        assertFalse(c.picks(banana));
    }

    public void testMethodPointcutNot() {
        MethodPointcut cut = cuts.not(cuts.oneMethod(getA));
View Full Code Here

        MethodPointcut b = cuts.union(cuts.oneMethod(apple), cuts.oneMethod(banana));
        MethodPointcut c = cuts.intersection(a, b);

        assertTrue(c.picks(apple));
        assertFalse(c.picks(apricot));
        assertFalse(c.picks(banana));
    }

    public void testMethodPointcutNot() {
        MethodPointcut cut = cuts.not(cuts.oneMethod(getA));
        assertFalse(cut.picks(getA));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.