Package org.jmock.core

Examples of org.jmock.core.CoreMock.proxy()


        } else if (returnType.isArray()) {
            return Array.newInstance(returnType.getComponentType(), 0);
        } else if (returnType.isInterface()) {
            CoreMock nullMock = new CoreMock(returnType, "null" + Formatting.classShortName(returnType));
            nullMock.setDefaultStub(this);
            return nullMock.proxy();
        } else {
            throw new AssertionFailedError(createErrorMessage(invocation));
        }
    }
View Full Code Here


            }
        });

        mock.addInvokable(mocker);

        return mock.proxy();
    }

    public static Object newDummy( final String name ) {
        return new Object() {
            public String toString() {
View Full Code Here

            }
        });

        mock.addInvokable(mocker);

        return mock.proxy();
    }

    public static Object newDummy( final String name ) {
        return new Object() {
            public String toString() {
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.