Package org.ibeans.api

Examples of org.ibeans.api.DataType


//        {
//            return helper.getReturnType();
//        }
//        else
        {
            DataType type = ctx.getIBeanConfig().getReturnType();
            if(type==null)
            {
                type = ctx.getIBeanDefaultConfig().getReturnType();
            }
            return type;
View Full Code Here


        return new Answer()
        {
            public Object answer(InvocationOnMock invocation) throws Throwable
            {
                MimeType mime = mimeType;
                DataType ret = ((MockIBean)ibean).ibeanReturnType();
                if(ret!=null) ret.setMimeType(mime.toString());
                Object data;

                /**
                 * We need to have some special handling when dealing with a Mockito mock
                 * 1) If the return type on the ibeans is not set, use the method return type
                 * 2) the return annotation changes the return type so use the one defined on the actual Method
                 * 3) If the return type and the method return type are not assignable, then use the method return type
                 */
                if (ret == null || invocation.getMethod().isAnnotationPresent(Return.class) ||
                        !invocation.getMethod().getReturnType().isAssignableFrom(ret.getType()))
                {
                    ret = DataTypeFactory.createFromReturnType(invocation.getMethod());
                    mime = null;
                }

View Full Code Here

TOP

Related Classes of org.ibeans.api.DataType

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.