Package org.mockito.internal.progress

Examples of org.mockito.internal.progress.HandyReturnValues


    public Object handle(Invocation invocation) throws Throwable {
        Object result = delegate.handle(invocation);
        Class<?> returnType = invocation.getMethod().getReturnType();
        if(result == null && returnType.isPrimitive()) {
            //primitive values cannot be null
            return new HandyReturnValues().returnFor(returnType);
        } else {
            return result;
        }
    }
View Full Code Here


        //then
        assertEquals(expected, returned);
    }

    private HandyReturnValues will_return(final Object expected) {
        return new HandyReturnValues() {
            @Override
            public <T> T returnFor(Class<T> clazz) {
                return (T) expected;
            }
        };
View Full Code Here

TOP

Related Classes of org.mockito.internal.progress.HandyReturnValues

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.