Package org.jboss.arquillian.warp.impl.shared

Examples of org.jboss.arquillian.warp.impl.shared.ResponsePayload


    public void processHttpRequest(@Observes ProcessHttpRequest event, ServiceLoader services, HttpServletRequest request,
            HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException {

        // setup responsePayload with temporary serialId before requestPayload is de-serialized
        responsePayload.set(new ResponsePayload(RequestPayload.FAILURE_SERIAL_ID));

        HttpRequestDeenricher requestDeenricher = services.onlyOne(HttpRequestDeenricher.class);

        if (requestDeenricher.isEnriched()) {

            RequestPayload p = requestDeenricher.resolvePayload();
            long serialId = p.getSerialId();
            responsePayload.set(new ResponsePayload(serialId));
            response.setHeader(WarpCommons.ENRICHMENT_RESPONSE, Long.toString(serialId));
            requestPayload.set(p);

            processWarpRequest.fire(new ProcessWarpRequest());
View Full Code Here


* @author Lukas Fryc
*/
public class ResponsePayloadVerifier {

    public void verifyTestResult(@Observes VerifyResponsePayload event) {
        ResponsePayload responsePayload = event.getResponsePayload();

        if (responsePayload.getTestResult().getStatus() == null) {
            throw new IllegalStateException("ResponsePayload must have TestResult set");
        }
    }
View Full Code Here

            throw new IllegalStateException("ResponsePayload must have TestResult set");
        }
    }

    public void verifyAllLifecycleTestsExecuted(@Observes VerifyResponsePayload event) {
        ResponsePayload responsePayload = event.getResponsePayload();

        if (responsePayload.getTestResult().getStatus() != TestResult.Status.FAILED) {

            Set<ExecutedMethod> executedMethods = responsePayload.getExecutedMethods();
            Set<ExecutedMethod> specifiedMethods = new HashSet<ExecutedMethod>();

            for (Inspection inspection : responsePayload.getInspections()) {
                List<Method> methods = SecurityActions.getMethodsWithAnnotation(inspection.getClass());

                for (Method method : methods) {
                    for (Annotation annotation : method.getDeclaredAnnotations()) {
                        Class<? extends Annotation> annotationType = annotation.annotationType();
View Full Code Here

            throw new IllegalStateException("The response payload with serialId " + serialId + " was already registered");
        }
    }

    public ResponsePayload retrieveResponsePayload(long serialId) {
        ResponsePayload payload = responsePayloads.remove(serialId);
        if (payload == null) {
            throw new ResponsePayloadWasNeverRegistered("The response payload with serialId " + serialId + " was never registered");
        }
        return payload;
    }
View Full Code Here

        try {
            registerResponsePayload(responsePayload.get());
        } catch (Exception e) {
            log.log(Level.WARNING, "Response enrichment failed", e);

            ResponsePayload exceptionPayload = new ResponsePayload(requestPayload.get().getSerialId());
            try {
                registerResponsePayload(exceptionPayload);
            } catch (Exception ex) {
                log.log(Level.SEVERE, "Response enrichment failed to attach enrichment failure", ex);
            }
View Full Code Here

* @author Lukas Fryc
*/
public class ResponsePayloadVerifier {

    public void verifyTestResult(@Observes VerifyResponsePayload event) {
        ResponsePayload responsePayload = event.getResponsePayload();

        if (responsePayload.getTestResult().getStatus() == null) {
            throw new IllegalStateException("ResponsePayload must have TestResult set");
        }
    }
View Full Code Here

            throw new IllegalStateException("ResponsePayload must have TestResult set");
        }
    }

    public void verifyAllLifecycleTestsExecuted(@Observes VerifyResponsePayload event) {
        ResponsePayload responsePayload = event.getResponsePayload();

        if (responsePayload.getTestResult().getStatus() != TestResult.Status.FAILED) {

            Set<ExecutedMethod> executedMethods = responsePayload.getExecutedMethods();
            Set<ExecutedMethod> specifiedMethods = new HashSet<ExecutedMethod>();

            for (Inspection inspection : responsePayload.getInspections()) {
                List<Method> methods = SecurityActions.getMethodsWithAnnotation(inspection.getClass());

                for (Method method : methods) {
                    for (Annotation annotation : method.getDeclaredAnnotations()) {
                        Class<? extends Annotation> annotationType = annotation.annotationType();
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.warp.impl.shared.ResponsePayload

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.