/** * Tests {@link Citations#toCodeSpace(Citation)} with some ignorable characters. * Ignorable character used in this test are: * * <ul> * <li>200B: zero width space</li> * <li>2060: word joiner</li> * </ul> */ @Test @DependsOnMethod("testGetIdentifier") public void testToCodeSpace() { final SimpleCitation citation = new SimpleCitation(" Valid\u2060Id\u200Bentifier "); assertEquals("ValidIdentifier", Citations.toCodeSpace(citation)); assertNull("Shall not be taken as a valid identifier.", Citations.toCodeSpace(new SimpleCitation("Proj.4"))); assertEquals("Shall fallback on the the identifier space name.", "TheProj4Space", Citations.toCodeSpace(new Proj4())); }