testing DOI

This commit is contained in:
Jörg Prante 2024-02-23 21:03:47 +01:00
parent af0cfb7ee8
commit 7104ccfbdc

View file

@ -10,11 +10,21 @@ public class DOITests {
@Test
public void testDOI() throws Exception {
StandardNumber doi = StandardNumber.getInstance("doi").set("10.1016/0032-3861(93)90481-o").normalize().verify();
StandardNumber doi = StandardNumber.getInstance("doi")
.set("10.1016/0032-3861(93)90481-o").normalize().verify();
assertEquals("10.1016/0032-3861(93)90481-o", doi.normalizedValue());
assertEquals("http://doi.org/10.1016/0032-3861(93)90481-o", doi.format());
}
@Test
public void testURL() throws Exception {
StandardNumber doi = StandardNumber.getInstance("doi")
.set("http://doi.org/10.1016/0032-3861(93)90481-o").normalize().verify();
assertEquals("10.1016/0032-3861(93)90481-o", doi.normalizedValue());
assertEquals("http://doi.org/10.1016/0032-3861(93)90481-o", doi.format());
}
@Test
public void testClone() throws Exception {
StandardNumber doi = StandardNumber.getInstance("doi").set("10.1016/0032-3861(93)90481-o").normalize().verify();