|
From: <pe...@us...> - 2004-01-05 23:47:15
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/test/org/neuclear/asset/receiver
Modified Files:
PaymentReceiverTest.java
Log Message:
Create new Document classification "order", which is really just inherint in the new
package layout.
Got rid of much of the inheritance that was lying around and thought a bit further about the format of the exchange orders.
Index: PaymentReceiverTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver/PaymentReceiverTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** PaymentReceiverTest.java 3 Jan 2004 20:36:26 -0000 1.11
--- PaymentReceiverTest.java 5 Jan 2004 23:47:10 -0000 1.12
***************
*** 2,10 ****
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
! import org.neuclear.asset.contracts.TransferGlobals;
! import org.neuclear.asset.contracts.TransferRequest;
! import org.neuclear.asset.contracts.builders.TransferRequestBuilder;
import org.neuclear.asset.controllers.currency.CurrencyController;
import org.neuclear.commons.NeuClearException;
--- 2,13 ----
import org.neuclear.asset.InvalidTransferException;
+ import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
! import org.neuclear.asset.orders.TransferGlobals;
! import org.neuclear.asset.orders.TransferOrder;
! import org.neuclear.asset.orders.TransferOrder;
! import org.neuclear.asset.orders.builders.TransferRequestBuilder;
! import org.neuclear.asset.orders.builders.TransferRequestBuilder;
import org.neuclear.asset.controllers.currency.CurrencyController;
import org.neuclear.commons.NeuClearException;
***************
*** 48,51 ****
--- 51,59 ----
$Id$
$Log$
+ Revision 1.12 2004/01/05 23:47:10 pelle
+ Create new Document classification "order", which is really just inherint in the new
+ package layout.
+ Got rid of much of the inheritance that was lying around and thought a bit further about the format of the exchange orders.
+
Revision 1.11 2004/01/03 20:36:26 pelle
Renamed HeldTransfer to Exchange
***************
*** 69,73 ****
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.
--- 77,81 ----
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 TransferOrder presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
***************
*** 112,117 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
which will handle all neuclear-ledger based AssetControllers.
--- 120,125 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferOrder/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
which will handle all neuclear-ledger based AssetControllers.
***************
*** 189,194 ****
public final Object getPreTransactionState(final SignedNamedObject obj) throws Exception {
! if (obj instanceof TransferRequest) {
! final TransferRequest transfer = (TransferRequest) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
--- 197,202 ----
public final Object getPreTransactionState(final SignedNamedObject obj) throws Exception {
! if (obj instanceof TransferOrder) {
! final TransferOrder transfer = (TransferOrder) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
***************
*** 201,206 ****
public final boolean verifyTransaction(final SignedNamedObject obj, final Object state) throws Exception {
! if (obj instanceof TransferRequest) {
! final TransferRequest transfer = (TransferRequest) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
--- 209,214 ----
public final boolean verifyTransaction(final SignedNamedObject obj, final Object state) throws Exception {
! if (obj instanceof TransferOrder) {
! final TransferOrder transfer = (TransferOrder) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
|