Package org.jasig.cas.web.view.Cas10ResponseViewTests

Examples of org.jasig.cas.web.view.Cas10ResponseViewTests.MockWriterHttpMockHttpServletResponse


       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        final MockWriterHttpMockHttpServletResponse servletResponse = new MockWriterHttpMockHttpServletResponse();
       
        this.response.renderMergedOutputModel(model, new MockHttpServletRequest(), servletResponse);
        final String written = servletResponse.getWrittenValue();
       
        assertTrue(written.contains("testPrincipal"));
        assertTrue(written.contains("testAttribute"));
        assertTrue(written.contains("testValue"));
        assertFalse(written.contains("testEmptyCollection"));
View Full Code Here


       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        final MockWriterHttpMockHttpServletResponse servletResponse = new MockWriterHttpMockHttpServletResponse();
       
        this.response.renderMergedOutputModel(model, new MockHttpServletRequest(), servletResponse);
        final String written = servletResponse.getWrittenValue();
       
        assertTrue(written.contains("testPrincipal"));
        assertTrue(written.contains(SAMLAuthenticationStatement.AuthenticationMethod_SSL_TLS_Client));
        assertTrue(written.contains("AuthenticationMethod"));
    }
View Full Code Here

       
        final Assertion assertion = new ImmutableAssertionImpl(authentications, TestUtils.getService(), true);
       
        model.put("assertion", assertion);
       
        final MockWriterHttpMockHttpServletResponse servletResponse = new MockWriterHttpMockHttpServletResponse();
       
        this.response.renderMergedOutputModel(model, new MockHttpServletRequest(), servletResponse);
        final String written = servletResponse.getWrittenValue();
       
        assertTrue(written.contains("testPrincipal"));
        assertTrue(written.contains("testAttribute"));
        assertTrue(written.contains("testValue"));
        assertTrue(written.contains("urn:oasis:names:tc:SAML:1.0:am:unspecified"));      
View Full Code Here

    private Saml10FailureResponseView view = new Saml10FailureResponseView();
   
    public void testResponse() throws Exception {
        final MockHttpServletRequest request =  new MockHttpServletRequest();
        final MockWriterHttpMockHttpServletResponse response = new MockWriterHttpMockHttpServletResponse();
        request.addParameter("TARGET", "service");
       
        final String description = "Validation failed";
        this.view.renderMergedOutputModel(
            Collections.singletonMap("description", description), request, response);
       
        final String responseText = response.getWrittenValue();
        assertTrue(responseText.contains("Status"));
        assertTrue(responseText.contains(description));
    }
View Full Code Here

TOP

Related Classes of org.jasig.cas.web.view.Cas10ResponseViewTests.MockWriterHttpMockHttpServletResponse

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.