Package org.easymock.internal

Examples of org.easymock.internal.Invocation


    private StringBuffer buffer;

    @Before
    public void setUp() throws Exception {
        LastControl.pushCurrentInvocation(new Invocation(this, getClass().getMethod("test"), new Object[0]));
        buffer = new StringBuffer();
    }
View Full Code Here


    public void testEquals() throws SecurityException, NoSuchMethodException {
        final Method toPreventNullPointerExceptionm = Object.class.getMethod("toString", new Class[] {});

        final Object mock = new Object();

        final ExpectedInvocation matchableArguments = new ExpectedInvocation(new Invocation(mock,
                toPreventNullPointerExceptionm, arguments), null);
        final ExpectedInvocation nonEqualMatchableArguments = new ExpectedInvocation(new Invocation(mock,
                toPreventNullPointerExceptionm, arguments2), null);

        assertFalse(matchableArguments.equals(null));
        assertFalse(matchableArguments.equals(nonEqualMatchableArguments));
    }
View Full Code Here

    @Before
    public void setup() throws SecurityException, NoSuchMethodException {
        final Object[] arguments1 = new Object[] { "" };
        final Method m = Object.class.getMethod("equals", new Class[] { Object.class });
        call = new ExpectedInvocation(new Invocation(null, m, arguments1), null);
    }
View Full Code Here

        final Object[] arguments1 = new Object[] { "" };
        final Object[] arguments2 = new Object[] { "" };
        final Object[] arguments3 = new Object[] { "X" };
        final Method m = Object.class.getMethod("equals", new Class[] { Object.class });
        final Object mock = new Object();
        call = new Invocation(mock, m, arguments1);
        equalCall = new Invocation(mock, m, arguments2);
        nonEqualCall = new Invocation(mock, m, arguments3);
    }
View Full Code Here

            public void aMethod() {
            }
        }

        final Method method = ToString.class.getMethod("aMethod", new Class[0]);
        Invocation invocation = new Invocation(new ToString("validJavaIdentifier"), method, null);

        assertEquals(invocation.toString(), "validJavaIdentifier.aMethod()");

        invocation = new Invocation(new ToString("no-valid-java-identifier"), method, null);

        assertEquals("aMethod()", invocation.toString());

    }
View Full Code Here

TOP

Related Classes of org.easymock.internal.Invocation

Copyright © 2018 www.massapicom. 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.