Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/source
In directory sc8-pr-cvs1:/tmp/cvs-serv17112/src/test/org/neuclear/source
Modified Files:
HttpSourceTest.java
Added Files:
AbstractSourceTest.java CachedSourceTest.java
Removed Files:
SourceTest.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.
--- NEW FILE: AbstractSourceTest.java ---
package org.neuclear.source;
import junit.framework.TestCase;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.SignedNamedObject;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: AbstractSourceTest.java,v 1.1 2003/11/22 00:23:48 pelle Exp $
$Log: AbstractSourceTest.java,v $
Revision 1.1 2003/11/22 00:23:48 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.2 2003/11/21 04:45:17 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Revision 1.1 2003/11/05 18:50:34 pelle
Refactored org.neuclear.signers.source.Source and implementing classes to provide support for a local filesystem cache.
Also added Unit tests to make sure it actually works and modified IdentityCreator to write directly to the cache if no output filename is given.
*/
/**
* User: pelleb
* Date: Nov 5, 2003
* Time: 1:21:24 PM
*/
public abstract class AbstractSourceTest extends TestCase {
public AbstractSourceTest(final String name) {
super(name);
source = createSource();
}
abstract protected Source createSource();
public final void testFetch() throws NeuClearException {
final SignedNamedObject test = source.fetch("http://repository.neuclear.org", "neu://test");
assertNotNull(test);
assertEquals("neu://test", test.getName());
final SignedNamedObject root = source.fetch("http://repository.neuclear.org", "neu://");
assertNotNull(root);
assertEquals("neu://", root.getName());
}
private final Source source;
}
--- NEW FILE: CachedSourceTest.java ---
package org.neuclear.source;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: CachedSourceTest.java,v 1.1 2003/11/22 00:23:48 pelle Exp $
$Log: CachedSourceTest.java,v $
Revision 1.1 2003/11/22 00:23:48 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.2 2003/11/21 04:45:17 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Revision 1.1 2003/11/05 18:50:34 pelle
Refactored org.neuclear.signers.source.Source and implementing classes to provide support for a local filesystem cache.
Also added Unit tests to make sure it actually works and modified IdentityCreator to write directly to the cache if no output filename is given.
*/
/**
* User: pelleb
* Date: Nov 5, 2003
* Time: 1:27:17 PM
*/
public final class CachedSourceTest extends AbstractSourceTest {
public CachedSourceTest(final String name) {
super(name);
}
public final Source createSource() {
return new CachedSource(new HttpSource());
}
}
Index: HttpSourceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/source/HttpSourceTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HttpSourceTest.java 21 Nov 2003 04:45:17 -0000 1.2
--- HttpSourceTest.java 22 Nov 2003 00:23:48 -0000 1.3
***************
*** 21,24 ****
--- 21,30 ----
$Id$
$Log$
+ Revision 1.3 2003/11/22 00:23:48 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.2 2003/11/21 04:45:17 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 38,47 ****
* Time: 1:27:17 PM
*/
! public final class HttpSourceTest extends SourceTest {
public HttpSourceTest(final String name) {
super(name);
}
! protected final Source createSource() {
return new HttpSource();
}
--- 44,53 ----
* Time: 1:27:17 PM
*/
! public final class HttpSourceTest extends AbstractSourceTest {
public HttpSourceTest(final String name) {
super(name);
}
! public final Source createSource() {
return new HttpSource();
}
--- SourceTest.java DELETED ---
|