|
From: <pe...@us...> - 2003-09-22 19:24:13
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv4908/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java
Log Message:
More fixes throughout to problems caused by renaming.
Index: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** NSToolsTest.java 19 Sep 2003 14:41:54 -0000 1.1.1.1
--- NSToolsTest.java 22 Sep 2003 19:24:03 -0000 1.2
***************
*** 2,5 ****
--- 2,8 ----
$Id$
$Log$
+ Revision 1.2 2003/09/22 19:24:03 pelle
+ More fixes throughout to problems caused by renaming.
+
Revision 1.1.1.1 2003/09/19 14:41:54 pelle
First import into the neuclear project. This was originally under the SF neudist
***************
*** 60,67 ****
package org.neuclear.id;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
! import org.neuclear.utils.NeudistException;
--- 63,71 ----
package org.neuclear.id;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
! import org.neudist.utils.NeudistException;
***************
*** 70,81 ****
* @author Pelle Braendgaard
*/
! public class NSToolsTest extends TestCase {
public NSToolsTest() {
! super("NSToolsTest");
setUp();
}
public NSToolsTest(String name) {
! super(name);
! }
/**
*/
--- 74,87 ----
* @author Pelle Braendgaard
*/
! public class NSToolsTest extends TestCase {
public NSToolsTest() {
! super("NSToolsTest");
setUp();
}
+
public NSToolsTest(String name) {
! super(name);
! }
!
/**
*/
***************
*** 84,101 ****
protected void tearDown() {
! }
! public static Test suite() {
! return new TestSuite(NSToolsTest.class);
! }
! private static void assertValidName(String name) throws NeudistException{
! assertTrue("Should be valid='"+name+"'",NSTools.isValidName(name));
}
! private static void assertInvalidName(String name) throws NeudistException{
! assertTrue("Should be invalid='"+name+"'",!NSTools.isValidName(name));
}
! public void testValidName() throws NeudistException{
assertValidName("/");
assertValidName("neu://");
--- 90,108 ----
protected void tearDown() {
! }
! public static Test suite() {
! return new TestSuite(NSToolsTest.class);
! }
! private static void assertValidName(String name) throws NeudistException {
! assertTrue("Should be valid='" + name + "'", NSTools.isValidName(name));
}
!
! private static void assertInvalidName(String name) throws NeudistException {
! assertTrue("Should be invalid='" + name + "'", !NSTools.isValidName(name));
}
! public void testValidName() throws NeudistException {
assertValidName("/");
assertValidName("neu://");
***************
*** 110,127 ****
assertInvalidName("/help/abcd_efg.-232Avc/");
}
public static void testNormalize() throws NeudistException {
! assertEquals("neu://hello",NSTools.normalizeNameURI("/hello"));
! assertEquals("neu://hello",NSTools.normalizeNameURI("neu://hello"));
}
public static void testFindParent() throws NeudistException {
! assertEquals("neu://hello",NSTools.getParentNSURI("neu://hello/one") );
! assertEquals("neu://hello",NSTools.getParentNSURI("/hello/one") );
! assertEquals("neu://",NSTools.getParentNSURI("neu://hello") );
! assertEquals("neu://",NSTools.getParentNSURI("/hello") );
! assertEquals("neu://",NSTools.getParentNSURI("neu://"));
! assertEquals("neu://",NSTools.getParentNSURI("/"));
}
-
--- 117,135 ----
assertInvalidName("/help/abcd_efg.-232Avc/");
}
+
public static void testNormalize() throws NeudistException {
! assertEquals("neu://hello", NSTools.normalizeNameURI("/hello"));
! assertEquals("neu://hello", NSTools.normalizeNameURI("neu://hello"));
}
+
public static void testFindParent() throws NeudistException {
! assertEquals("neu://hello", NSTools.getParentNSURI("neu://hello/one"));
! assertEquals("neu://hello", NSTools.getParentNSURI("/hello/one"));
! assertEquals("neu://", NSTools.getParentNSURI("neu://hello"));
! assertEquals("neu://", NSTools.getParentNSURI("/hello"));
! assertEquals("neu://", NSTools.getParentNSURI("neu://"));
! assertEquals("neu://", NSTools.getParentNSURI("/"));
}
|