|
From: <pe...@us...> - 2003-11-22 00:23:50
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv17112/src/test/org/neuclear/id/builders
Modified Files:
IdentityBuilderTest.java
Log Message:
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
Payment Web App has working form that creates a TransferRequest presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
Index: IdentityBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/IdentityBuilderTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** IdentityBuilderTest.java 21 Nov 2003 04:45:17 -0000 1.7
--- IdentityBuilderTest.java 22 Nov 2003 00:23:47 -0000 1.8
***************
*** 2,9 ****
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.crypto.passphraseagents.GuiDialogAgent;
- import org.neuclear.commons.crypto.signers.DefaultSigner;
import org.neuclear.commons.crypto.signers.PublicKeySource;
- import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.id.NSTools;
import org.neuclear.id.SignedNamedObject;
--- 2,6 ----
***************
*** 11,15 ****
import org.neuclear.xml.XMLException;
- import java.io.File;
import java.io.FileNotFoundException;
import java.security.GeneralSecurityException;
--- 8,11 ----
***************
*** 35,38 ****
--- 31,40 ----
$Id$
$Log$
+ Revision 1.8 2003/11/22 00:23:47 pelle
+ All unit tests in commons, id and xmlsec now work.
+ AssetController now successfully processes payments in the unit test.
+ Payment Web App has working form that creates a TransferRequest presents it to the signer
+ and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
+
Revision 1.7 2003/11/21 04:45:17 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 78,82 ****
public IdentityBuilderTest(final String string) throws GeneralSecurityException, NeuClearException, FileNotFoundException {
super(string);
- rootsigner = new DefaultSigner(new GuiDialogAgent());
}
--- 80,83 ----
***************
*** 91,107 ****
"mailto:pe...@ne...");
! final String parent = NSTools.getParentNSURI(id.getName());
! final SignedNamedObject sec = null;
! if (getSigner().canSignFor(parent)) {
! id.sign(getSigner());
! } else if (parent.equals("neu://")) {
! id.sign(rootsigner);
! }
assertNotNull(sec);
- final File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
- file.getParentFile().mkdirs();
- System.out.println("Wrote: " + file.getAbsolutePath());
assertEquals(id.getName(), sec.getName());
! assertTrue(true);
} else {
// assertTrue(false);
--- 92,100 ----
"mailto:pe...@ne...");
! assertEquals("neu://test", NSTools.getParentNSURI(id.getName()));
! final SignedNamedObject sec = id.sign(getSigner());
assertNotNull(sec);
assertEquals(id.getName(), sec.getName());
!
} else {
// assertTrue(false);
***************
*** 113,117 ****
public final void testBuild() throws NeuClearException, XMLException {
// createIdentities("neu://test");
- createIdentities("neu://test/bux");
createIdentities("neu://bob@test");
createIdentities("neu://alice@test");
--- 106,109 ----
***************
*** 119,123 ****
}
- private static final String PATH = "target/testdata/unsigned";
- private final Signer rootsigner;
}
--- 111,113 ----
|