|
From: <pe...@us...> - 2003-12-26 22:50:55
|
Update of /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger In directory sc8-pr-cvs1:/tmp/cvs-serv2665/src/test/org/neuclear/ledger Modified Files: LedgerTest.java SQLLedgerTest.java Log Message: Mainly fixes to SQLLedger to support the schema generated by the new EntityModel Index: LedgerTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/LedgerTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** LedgerTest.java 24 Dec 2003 00:24:33 -0000 1.7 --- LedgerTest.java 26 Dec 2003 22:50:52 -0000 1.8 *************** *** 5,8 **** --- 5,10 ---- import org.neuclear.commons.sql.DefaultConnectionSource; import org.neuclear.commons.sql.DefaultXAConnectionSource; + import org.neuclear.commons.sql.TestCaseConnectionSource; + import org.neuclear.commons.sql.TestCaseXAConnectionSource; import org.neuclear.ledger.implementations.SQLLedger; *************** *** 23,26 **** --- 25,31 ---- * $Id$ * $Log$ + * Revision 1.8 2003/12/26 22:50:52 pelle + * Mainly fixes to SQLLedger to support the schema generated by the new EntityModel + * * Revision 1.7 2003/12/24 00:24:33 pelle * Created a kind of poor man's version of ofbiz.org's EntityEngine. It doesnt use xml to configure it, but code. *************** *** 122,126 **** public LedgerTest(final String s) throws LowlevelLedgerException, UnknownLedgerException, SQLException, NamingException, IOException, NeuClearException { super(s); ! ledger = new SQLLedger(new DefaultXAConnectionSource(), "neu://superbux/reserve"); } --- 127,131 ---- public LedgerTest(final String s) throws LowlevelLedgerException, UnknownLedgerException, SQLException, NamingException, IOException, NeuClearException { super(s); ! ledger = new SQLLedger(new TestCaseXAConnectionSource(), "neu://superbux/reserve"); } *************** *** 253,258 **** assertEquals(aliceBalance - amount, alice.getAvailableBalance(t2), 0); assertEquals(aliceBalance - amount, alice.getAvailableBalance(t3), 0); ! assertEquals(aliceBalance - amount, alice.getAvailableBalance(t4), 0); // Her available balance should be the same as her real balance here assertEquals(alice.getBalance(t5), alice.getAvailableBalance(t5), 0); assertEquals(alice.getBalance(t1), alice.getAvailableBalance(t1), 0); --- 258,264 ---- assertEquals(aliceBalance - amount, alice.getAvailableBalance(t2), 0); assertEquals(aliceBalance - amount, alice.getAvailableBalance(t3), 0); ! // Her available balance should be the same as her real balance here + assertEquals(alice.getBalance(t4), alice.getAvailableBalance(t4), 0); assertEquals(alice.getBalance(t5), alice.getAvailableBalance(t5), 0); assertEquals(alice.getBalance(t1), alice.getAvailableBalance(t1), 0); *************** *** 324,328 **** assertEquals(ignacio.getAvailableBalance(t2), balance - held, 0); assertEquals(ignacio.getAvailableBalance(t3), balance - held, 0); ! assertEquals(ignacio.getAvailableBalance(t4), balance - held, 0); assertEquals(ignacio.getAvailableBalance(t5), balance, 0); --- 330,334 ---- assertEquals(ignacio.getAvailableBalance(t2), balance - held, 0); assertEquals(ignacio.getAvailableBalance(t3), balance - held, 0); ! assertEquals(ignacio.getAvailableBalance(t4), balance , 0); assertEquals(ignacio.getAvailableBalance(t5), balance, 0); Index: SQLLedgerTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/SQLLedgerTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SQLLedgerTest.java 24 Dec 2003 00:24:33 -0000 1.4 --- SQLLedgerTest.java 26 Dec 2003 22:50:52 -0000 1.5 *************** *** 20,24 **** public SQLLedgerTest(final String s) throws LowlevelLedgerException, UnknownLedgerException, SQLException, NamingException, IOException, NeuClearException { super(s); ! SQLLedger.create(new DefaultConnectionSource()); } --- 20,24 ---- public SQLLedgerTest(final String s) throws LowlevelLedgerException, UnknownLedgerException, SQLException, NamingException, IOException, NeuClearException { super(s); ! //SQLLedger.create(new DefaultConnectionSource()); } |