Package org.codehaus.cargo.module.webapp

Examples of org.codehaus.cargo.module.webapp.WebXml.addSecurityConstraint()


        throws Exception
    {
        String xml = "<web-app></web-app>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        WebXml webXml = new WebXml(doc);
        webXml.addSecurityConstraint("wrn", "/url", Collections.EMPTY_LIST);
        assertTrue(webXml.hasSecurityConstraint("/url"));
    }

    /**
     * Tests whether a security-constraint with two roles is successfully added
View Full Code Here


        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        WebXml webXml = new WebXml(doc);
        List roles = new ArrayList();
        roles.add("role1");
        roles.add("role2");
        webXml.addSecurityConstraint("wrn", "/url", roles);
        assertTrue(webXml.hasSecurityConstraint("/url"));
        Element securityConstraintElement =
            webXml.getSecurityConstraint("/url");
        assertNotNull(securityConstraintElement);
        Element authConstraintElement = (Element)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.