Package org.jboss.arquillian.warp.extension.spring

Examples of org.jboss.arquillian.warp.extension.spring.SpringMvcResult


        // gets the collection of the annotated attributes
        List<Field> annotatedFields = SecurityActions.getFieldsWithAnnotation(testCase.getClass(),
                SpringMvcResource.class);

        // retrieves the captured execution context
        SpringMvcResult mvcResult = getSpringMvcResult();

        try {
            for (Field field : annotatedFields) {
                Object value = null;

                if (mvcResult != null) {
                    if (field.getType() == SpringMvcResult.class) {
                        value = mvcResult;
                    } else if (field.getType() == ModelAndView.class) {
                        value = mvcResult.getModelAndView();
                    } else if (field.getType() == Exception.class) {
                        value = mvcResult.getException();
                    } else if (field.getType() == HandlerInterceptor[].class) {
                        value = mvcResult.getInterceptors();
                    } else if (field.getType() == Errors.class) {
                        value = mvcResult.getErrors();
                    } else if (mvcResult.getHandler() != null &&
                            field.getType() == mvcResult.getHandler().getClass()) {
                        value = mvcResult.getHandler();
                    }
                }

                field.set(testCase, value);
            }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.warp.extension.spring.SpringMvcResult

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.