Package org.jboss.dna.common.text

Examples of org.jboss.dna.common.text.TextEncoder.encode()


    @Test
    public void shouldAlwaysReturnPathWithSingleSlashForGetString() {
        NamespaceRegistry registry = mock(NamespaceRegistry.class);
        TextEncoder encoder = mock(TextEncoder.class);
        stub(encoder.encode("/")).toReturn("/");
        assertThat(root.getString(), is("/"));
        assertThat(root.getString(registry), is("/"));
        assertThat(root.getString(registry, encoder), is("/"));
        assertThat(root.getString(registry, encoder, encoder), is("/"));
        assertThat(root.getString(encoder), is("/"));
View Full Code Here


    }

    @Test
    public void shouldAllowNullNamespaceRegistryWithNonNullTextEncodersSinceRegistryIsNotNeeded() {
        TextEncoder encoder = mock(TextEncoder.class);
        stub(encoder.encode("/")).toReturn("/");
        assertThat(root.getString((NamespaceRegistry)null, encoder, encoder), is("/"));
    }

    @Test
    public void shouldAllowNullTextEncoder() {
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.