|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java NameSpaceTest.java
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NSToolsTest.java 23 Sep 2003 19:16:29 -0000 1.3
--- NSToolsTest.java 29 Sep 2003 23:17:32 -0000 1.4
***************
*** 2,5 ****
--- 2,9 ----
$Id$
$Log$
+ Revision 1.4 2003/09/29 23:17:32 pelle
+ Changes to the senders. Now the senders only work with NamedObjectBuilders
+ which are the only NamedObject representations that contain full XML.
+
Revision 1.3 2003/09/23 19:16:29 pelle
Changed NameSpace to Identity.
***************
*** 75,101 ****
/**
! * @stereotype role
* @author Pelle Braendgaard
*/
public class NSToolsTest extends TestCase {
- public NSToolsTest() {
- super("NSToolsTest");
- setUp();
- }
public NSToolsTest(String name) {
super(name);
- }
-
- /**
- */
- protected void setUp() {
- }
-
- protected void tearDown() {
- }
-
- public static Test suite() {
- return new TestSuite(NSToolsTest.class);
}
--- 79,89 ----
/**
! *
* @author Pelle Braendgaard
*/
public class NSToolsTest extends TestCase {
public NSToolsTest(String name) {
super(name);
}
Index: NameSpaceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NameSpaceTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NameSpaceTest.java 23 Sep 2003 19:16:29 -0000 1.3
--- NameSpaceTest.java 29 Sep 2003 23:17:32 -0000 1.4
***************
*** 2,5 ****
--- 2,9 ----
$Id$
$Log$
+ Revision 1.4 2003/09/29 23:17:32 pelle
+ Changes to the senders. Now the senders only work with NamedObjectBuilders
+ which are the only NamedObject representations that contain full XML.
+
Revision 1.3 2003/09/23 19:16:29 pelle
Changed NameSpace to Identity.
***************
*** 134,144 ****
*/
public class NameSpaceTest extends TestCase {
! public NameSpaceTest() throws GeneralSecurityException, IOException, FileNotFoundException {
! super("NameSpaceTest");
! setUp();
}
! public NameSpaceTest(String name) {
! super(name);
! }
/**
* The general test setup consists of a minimal neuspace with 4 keys:
--- 138,146 ----
*/
public class NameSpaceTest extends TestCase {
!
! public NameSpaceTest(String string) {
! super(string);
}
!
/**
* The general test setup consists of a minimal neuspace with 4 keys:
***************
*** 198,221 ****
}
- /*
- private Identity createNeuRoot() throws NeudistException {
- return null;//new Identity("neu://",root,root.getPublic());
- }
- private Identity createNeuBob() throws NeudistException {
- return null;//new Identity("neu://bob",root,bob.getPublic());
- }
- private Identity createNeuAlice() throws NeudistException {
- return null;// new Identity("neu://alice",root,alice.getPublic());
- }
- private Identity createNeuBobAlice() throws NeudistException {
- return null;// new Identity("neu://bob/alice",bob,alice.getPublic());
- }
- private Identity createNeuEvilEve() throws NeudistException {
- return null;// new Identity("neu://eve",eve,eve.getPublic());
- }
- */
protected void tearDown() {
! }
private static void sleepabit() {
--- 200,206 ----
}
protected void tearDown() {
! }
private static void sleepabit() {
***************
*** 227,285 ****
}
- public static Test suite() {
-
-
- return new TestSuite(NameSpaceTest.class);
- }
-
- /* public void testCreateRoot() throws NeudistException, InvalidIdentityException{
- Identity neuRoot=createNeuRoot();
- Store neuspace=new MemoryStore();
- neuspace.receive(neuRoot);
- assertNotNull("Test that we can add a root",neuRoot);
- }
- */
- /*
-
- public void testCreateChild() throws NeudistException, InvalidIdentityException{
- MemoryStore neuspace=new MemoryStore();
- Identity neuBob=new Identity("neu://test/bob",bob.getPublic());
- neuBob.sign(test);
- neuspace.receive(neuBob);
- assertNotNull("Test that we can add Bob under the root",neuBob);
-
- }
-
- public void testCreateInvalidChild() throws NeudistException, InvalidIdentityException{
- MemoryStore neuspace=new MemoryStore();
- Identity neuEve=new Identity("neu://test/eve",eve.getPublic());
- neuEve.sign(eve.getPrivate());
- boolean success=false;
- try {
- neuspace.receive(neuEve);
- } catch (InvalidIdentityException e) {
- success=true;
- }
- assertTrue("Test that we cant add Eve's selfsigned Neu under the root",success);
! }
! public static void main(String args[]) {
! try {
! NameSpaceTest test=new NameSpaceTest();
! test.testCreateChild();
! test.testCreateInvalidChild();
! } catch (GeneralSecurityException e) {
! Utility.handleException(e);
! } catch (IOException e) {
! Utility.handleException(e);
! } catch (NeudistException e) {
! Utility.handleException(e);
! }
! }
! */
!
! // KeyPair root;
! // PrivateKey aliceSigner;
! // PrivateKey bobSigner;
PrivateKey test;
KeyPair bob;
--- 212,219 ----
}
! KeyPair root;
! PrivateKey aliceSigner;
! PrivateKey bobSigner;
PrivateKey test;
KeyPair bob;
|