Package org.apache.xml.security.c14n.implementations

Examples of org.apache.xml.security.c14n.implementations.NameSpaceSymbTable


        assertNull(ns.getMapping("a"));
    }
   
    @org.junit.Test
    public void testSeveralPrefixes2() {
        NameSpaceSymbTable ns = new NameSpaceSymbTable();
        ns.push();
        ns.addMapping("a", "http://a",node1);
        ns.push();       
        assertEquals(node1, ns.getMapping("a"));
        ns.pop();
        assertEquals(node1, ns.getMapping("a"));       
    }
View Full Code Here


        assertEquals(node1, ns.getMapping("a"));       
    }
   
    @org.junit.Test
    public void testGetUnrenderedNodes() {
        NameSpaceSymbTable ns = new NameSpaceSymbTable();
        ns.push();
        List<Attr> l = new ArrayList<Attr>();
        ns.addMapping("xmlns", "http://a", node1);
        ns.push();
        ns.getUnrenderedNodes(l);
        assertTrue(l.contains(node1));
        Attr n = (Attr)ns.addMappingAndRender("xmlns", "", node2);
        assertNotNull("xmlns=\"\" not rendered", n);
        assertEquals(n, node2);
    }
View Full Code Here

        assertEquals(n, node2);
    }
   
    @org.junit.Test
    public void testUnrederedNodes() {
        NameSpaceSymbTable ns = new NameSpaceSymbTable();
        ns.push();
        List<Attr> l = new ArrayList<Attr>();
        ns.getUnrenderedNodes(l);
        assertTrue(l.isEmpty());
        l.clear();
        ns.push();
        ns.addMapping("xmlns","http://a", node1);
        ns.addMapping("a", "http://a", node2);

        ns.push();

        ns.getUnrenderedNodes(l);
        assertTrue(l.contains(node1));
        assertTrue(l.contains(node2));
        ns.push();
        l.clear();
        ns.getUnrenderedNodes(l);
        assertFalse(l.contains(node1));
        assertFalse(l.contains(node2));  
        ns.pop();
        ns.pop();
        l.clear();
        ns.getUnrenderedNodes(l);
        assertTrue(l.contains(node1));
        assertTrue(l.contains(node2));
    }
View Full Code Here

        assertTrue(l.contains(node2));
    }

    @org.junit.Test
    public void testBug38655() {
        NameSpaceSymbTable ns = new NameSpaceSymbTable();
        ns.push();

        ns.addMappingAndRender("generated-command", "http://foo.com/command",node1);          
        ns.addMappingAndRender("generated-event", "http://foo.com/event",node1);
        ns.addMappingAndRender("command", "http://foo.com/command",node1);
        ns.addMappingAndRender("ui", "http://foo.com/ui", node1);
        ns.addMappingAndRender("event", "http://foo.com/event", node1);
        ns.addMappingAndRender("instruction", "http://foo/instruction", node1);
        ns.addMappingAndRender("directory", "http://foo.com/io/directory", node1);           
        ns.addMappingAndRender("function", "http://foo.com/function", node1);
        ns.addMappingAndRender("xmlns", "http://www.w3.org/1999/xhtml", node1);
        ns.addMappingAndRender("ctrl", "http://foo.com/controls", node1);
        ns.addMappingAndRender("wiki", "http://foo.com/samples/wiki", node1);
    }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.c14n.implementations.NameSpaceSymbTable

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.