|
From: <pe...@us...> - 2003-09-22 19:24:13
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv4908/src/test/org/neuclear/store
Modified Files:
AbstractStoreTest.java
Removed Files:
CachedStoreTest.java MemoryStoreTest.java
Log Message:
More fixes throughout to problems caused by renaming.
Index: AbstractStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/AbstractStoreTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractStoreTest.java 19 Sep 2003 14:42:03 -0000 1.1.1.1
--- AbstractStoreTest.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:42:03 pelle
First import into the neuclear project. This was originally under the SF neudist
***************
*** 81,87 ****
package org.neuclear.store;
import junit.framework.TestCase;
import org.neuclear.id.InvalidNameSpaceException;
! import org.neuclear.utils.NeudistException;
import java.security.GeneralSecurityException;
--- 84,91 ----
package org.neuclear.store;
+
import junit.framework.TestCase;
import org.neuclear.id.InvalidNameSpaceException;
! import org.neudist.utils.NeudistException;
import java.security.GeneralSecurityException;
***************
*** 94,131 ****
* @author Pelle Braendgaard
*/
! public abstract class AbstractStoreTest extends TestCase {
public AbstractStoreTest(String name) throws GeneralSecurityException {
! super(name);
setUp();
}
/**
*/
public abstract Store getStoreInstance();
! protected void setUp() throws GeneralSecurityException{
! store=getStoreInstance();
generateKeys();
}
protected static synchronized void generateKeys() throws GeneralSecurityException {
! if (kg==null) {
System.out.println("Generating Test Keys");
! kg=KeyPairGenerator.getInstance("RSA");
! kg.initialize(2048,new SecureRandom("Bear it all with NeuDist".getBytes()));
! // kp=kg.generateKeyPair();
! root=kg.generateKeyPair();
! bob=kg.generateKeyPair();
! alice=kg.generateKeyPair();
! eve=kg.generateKeyPair();
}
}
protected void tearDown() {
! store=null;
! }
! public void testStore() throws NeudistException,InvalidNameSpaceException {
! System.out.println("\nTesting "+this.getClass().getName());
// System.out.println("Storing "+rootName);
// store.receive(new NameSpace(rootName,root,root.getPublic()));
--- 98,137 ----
* @author Pelle Braendgaard
*/
! public abstract class AbstractStoreTest extends TestCase {
public AbstractStoreTest(String name) throws GeneralSecurityException {
! super(name);
setUp();
}
+
/**
*/
public abstract Store getStoreInstance();
! protected void setUp() throws GeneralSecurityException {
! store = getStoreInstance();
generateKeys();
}
+
protected static synchronized void generateKeys() throws GeneralSecurityException {
! if (kg == null) {
System.out.println("Generating Test Keys");
! kg = KeyPairGenerator.getInstance("RSA");
! kg.initialize(2048, new SecureRandom("Bear it all with NeuDist".getBytes()));
! // kp=kg.generateKeyPair();
! root = kg.generateKeyPair();
! bob = kg.generateKeyPair();
! alice = kg.generateKeyPair();
! eve = kg.generateKeyPair();
}
}
protected void tearDown() {
! store = null;
! }
! public void testStore() throws NeudistException, InvalidNameSpaceException {
! System.out.println("\nTesting " + this.getClass().getName());
// System.out.println("Storing "+rootName);
// store.receive(new NameSpace(rootName,root,root.getPublic()));
***************
*** 150,154 ****
// NamedObject nobj4=store.fetch(eveName);
// assertEquals(NSTools.normalizeNameURI(eveName),nobj4.getName());
! }
// KeyPair root;
--- 156,160 ----
// NamedObject nobj4=store.fetch(eveName);
// assertEquals(NSTools.normalizeNameURI(eveName),nobj4.getName());
! }
// KeyPair root;
***************
*** 156,163 ****
// PrivateKey bobSigner;
Store store;
! protected static final String rootName="/";
! protected static final String bobName="/bob";
! protected static final String bobAliceName="/bob/alice";
! protected static final String eveName="/eve";
protected static KeyPairGenerator kg;
--- 162,169 ----
// PrivateKey bobSigner;
Store store;
! protected static final String rootName = "/";
! protected static final String bobName = "/bob";
! protected static final String bobAliceName = "/bob/alice";
! protected static final String eveName = "/eve";
protected static KeyPairGenerator kg;
--- CachedStoreTest.java DELETED ---
--- MemoryStoreTest.java DELETED ---
|