@Test public void shouldEncodeColonInLocalNameAndNamespaceUriInResultFromGetStringWithoutNamespaceRegistry() { validLocalName = "some:name:with:colons"; name = new BasicName(validNamespaceUri, validLocalName); String encodedNamespaceUri = encoder.encode(validNamespaceUri); String encodedLocalName = encoder.encode(validLocalName); String result = name.getString(encoder); assertThat(result, is("mode:" + encodedLocalName)); assertThat(encodedNamespaceUri, is("http%3a%2f%2fwww.modeshape.org%2f1.0")); assertThat(encodedLocalName, is("some%3aname%3awith%3acolons")); }
@Override public String getString() { return getString(Path.DEFAULT_ENCODER); }
BasicName implements Name { @Override public String getString() { return getString(Path.DEFAULT_ENCODER); } }
BasicName implements Name { @Override public String getString() { return getString(Path.DEFAULT_ENCODER); } BasicName( String namespaceUri,
                      String localName ); }
BasicName implements Name { @Override public String getString() { return getString(Path.DEFAULT_ENCODER); } BasicName( String namespaceUri,
                      String localName ); @Override String getLocalName(); @Override String getNamespaceUri(); @Override String getString(); @Override String getString( TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); @Override int compareTo( Name that ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); }
BasicName implements Name { @Override public String getString() { return getString(Path.DEFAULT_ENCODER); } BasicName( String namespaceUri,
                      String localName ); @Override String getLocalName(); @Override String getNamespaceUri(); @Override String getString(); @Override String getString( TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); @Override int compareTo( Name that ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString();  }