private static int NUM_TESTS = 1;
public void testParse() throws Exception {
for (int i=0; i<tests.length; i++) {
JcrName t = tests[i];
long t1 = System.currentTimeMillis();
for (int j=0; j<NUM_TESTS; j++) {
try {
Name n = NameParser.parse(t.jcrName, resolver, factory);
if (!t.isValid()) {
fail("Should throw IllegalNameException: " + t.jcrName);
}
assertEquals("\"" + t.jcrName + "\".uri", t.prefix, n.getNamespaceURI());
assertEquals("\"" + t.jcrName + "\".localName", t.name, n.getLocalName());
} catch (IllegalNameException e) {
if (t.isValid()) {
throw e;
}
} catch (NamespaceException e) {
if (t.isValid()) {
throw e;
}
}
}
long t2 = System.currentTimeMillis();