Package samples.suppressmethod

Examples of samples.suppressmethod.SuppressMethod.invokeVoid()


    public void testInvokeVoid() throws Exception {
        suppress(method(SuppressMethod.class, "invokeVoid", new Class<?>[] { StringBuilder.class }));

        SuppressMethod tested = new SuppressMethod();
        // Should not cause an NPE when suppressing code.
        tested.invokeVoid(null);
    }

    @Test
    public void testInvokeVoid_noParameterTypeSupplied() throws Exception {
        suppress(method(SuppressMethod.class, "invokeVoid"));
View Full Code Here


    public void testInvokeVoid_noParameterTypeSupplied() throws Exception {
        suppress(method(SuppressMethod.class, "invokeVoid"));

        SuppressMethod tested = new SuppressMethod();
        // Should not cause an NPE when suppressing code.
        tested.invokeVoid(null);
    }

    @Test
    public void suppressAllMethodsInMultipleClasses() throws Exception {
        suppress(methodsDeclaredIn(SuppressMethod.class, SuppressMethodExample.class));
View Full Code Here

        suppress(methodsDeclaredIn(SuppressMethod.class, SuppressMethodExample.class));

        SuppressMethod tested1 = new SuppressMethod();
        SuppressMethodExample tested2 = new SuppressMethodExample();
        // Should not cause an NPE when suppressing code.
        tested1.invokeVoid(null);

        assertNull(tested1.getObject());
        assertEquals(0, tested1.getInt());
        assertNull(tested2.getObject());
    }
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.