| org.jaffa.persistence.blackboxtests.AddTest
AddTest | public class AddTest extends TestCase (Code) | | Tests for performing inserts through the Jaffa Persistence Engine.
author: GautamJ |
Method Summary | |
protected void | setUp() Sets up the fixture, by creating the UOW. | protected void | tearDown() Tears down the fixture, by closing the UOW. | public void | testAddDateTime() Inserts a record into ITEM using the query:
insert into ITEM(ITEM_ID, CREATED_DATETIME) values('Z-TESTITEM-04', to_date('2003-09-10 20:30:40', 'yyyy-MM-dd hh24:mi:ss')).
It then checks if the record was added. | public void | testAddDuplicates() Inserts a record into SYCI using the query:
insert into SYCI(CATEGORY_INSTRUMENT, DESCRIPTION) values('Z-TESTCI-03', 'Z-TESTCIDESC-03').
It then tries to add the same record. | public void | testAddLong() Inserts a record into CATZ using the query:
insert into CATZ(PART, REMARKS) values('Z-TESTPART-02', some 10,000 character string).
It then checks if the record was added. | public void | testAddWithAutoKey() Inserts a record into ASSET, which has a database generated key
It then checks if the record was added. | public void | testCheckRollbackAfterAdd() Inserts a record into SYCI using the query:
insert into SYCI(CATEGORY_INSTRUMENT, DESCRIPTION) values('Z-TESTCI-03', 'Z-TESTCIDESC-03').
It then does a rollback. | public void | testCreateCategoryOfInstrument() Inserts a record into SYCI using the query:
insert into SYCI(CATEGORY_INSTRUMENT, DESCRIPTION) values('Z-TESTCI-02', 'Z-TESTCIDESC-02').
It then checks if the record was added. |
AddTest | public AddTest(String name)(Code) | | Creates new QueryTest
Parameters: name - The name of the test case. |
setUp | protected void setUp()(Code) | | Sets up the fixture, by creating the UOW. This method is called before a test is executed.
|
tearDown | protected void tearDown()(Code) | | Tears down the fixture, by closing the UOW. This method is called after a test is executed.
|
testAddDateTime | public void testAddDateTime()(Code) | | Inserts a record into ITEM using the query:
insert into ITEM(ITEM_ID, CREATED_DATETIME) values('Z-TESTITEM-04', to_date('2003-09-10 20:30:40', 'yyyy-MM-dd hh24:mi:ss')).
It then checks if the record was added. Finally the record is deleted
|
testAddDuplicates | public void testAddDuplicates()(Code) | | Inserts a record into SYCI using the query:
insert into SYCI(CATEGORY_INSTRUMENT, DESCRIPTION) values('Z-TESTCI-03', 'Z-TESTCIDESC-03').
It then tries to add the same record. The test is successful, if an exception is raised.
Finally it rollbacks the changes
|
testAddLong | public void testAddLong()(Code) | | Inserts a record into CATZ using the query:
insert into CATZ(PART, REMARKS) values('Z-TESTPART-02', some 10,000 character string).
It then checks if the record was added. Finally the record is deleted
|
testAddWithAutoKey | public void testAddWithAutoKey()(Code) | | Inserts a record into ASSET, which has a database generated key
It then checks if the record was added. Finally the record is deleted
|
testCheckRollbackAfterAdd | public void testCheckRollbackAfterAdd()(Code) | | Inserts a record into SYCI using the query:
insert into SYCI(CATEGORY_INSTRUMENT, DESCRIPTION) values('Z-TESTCI-03', 'Z-TESTCIDESC-03').
It then does a rollback. This is followed by a commit. The test fails if the record is added.
|
testCreateCategoryOfInstrument | public void testCreateCategoryOfInstrument()(Code) | | Inserts a record into SYCI using the query:
insert into SYCI(CATEGORY_INSTRUMENT, DESCRIPTION) values('Z-TESTCI-02', 'Z-TESTCIDESC-02').
It then checks if the record was added. Finally the record is deleted
|
|
|