| org.jaffa.persistence.blackboxtests.UpdateTest
UpdateTest | public class UpdateTest extends TestCase (Code) | | Tests for performing updates 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 | testCheckRollbackAfterUpdate() Executes the following query:
update syci set description='AFTER ROLLBACK' WHERE CATEGORY_INSTRUMENT='Z-TESTCI-01'
It then does a rollback. | public void | testUpdateCategoryOfInstrument() Executes the following query:
update syci set description='UPDATED DESC', SUPPORT_EQUIP_B='F', CALCULATE_MTBF_B='T' WHERE CATEGORY_INSTRUMENT='Z-TESTCI-01'
It then ensures that the record was properly updated. | public void | testUpdateDateTime() | public void | testUpdateLong() Updates a CATZ using the query:
update catz set REMARKS = some 10,000 character string WHERE PART='Z-TESTPART-01'
It then ensures that the record was properly updated. | public void | testUpdateUsingQuote() Executes the following query:
update syci set description='JOHN'S DESC' WHERE CATEGORY_INSTRUMENT='Z-TESTCI-01'
It then ensures that the record was properly updated and resets the description to the old value. |
UpdateTest | public UpdateTest(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.
|
testCheckRollbackAfterUpdate | public void testCheckRollbackAfterUpdate()(Code) | | Executes the following query:
update syci set description='AFTER ROLLBACK' WHERE CATEGORY_INSTRUMENT='Z-TESTCI-01'
It then does a rollback. This is followed by a commit.
The test fails if the record is updated.
|
testUpdateCategoryOfInstrument | public void testUpdateCategoryOfInstrument()(Code) | | Executes the following query:
update syci set description='UPDATED DESC', SUPPORT_EQUIP_B='F', CALCULATE_MTBF_B='T' WHERE CATEGORY_INSTRUMENT='Z-TESTCI-01'
It then ensures that the record was properly updated.
|
testUpdateDateTime | public void testUpdateDateTime()(Code) | | Executes the following query:
update item set created_datetime=to_date('2003-10-10', 'yyyy-MM-dd') where item_id='Z-TESTITEM-01'
It then ensures that the record was properly updated and then resets it back to the original value
|
testUpdateLong | public void testUpdateLong()(Code) | | Updates a CATZ using the query:
update catz set REMARKS = some 10,000 character string WHERE PART='Z-TESTPART-01'
It then ensures that the record was properly updated.
|
testUpdateUsingQuote | public void testUpdateUsingQuote()(Code) | | Executes the following query:
update syci set description='JOHN'S DESC' WHERE CATEGORY_INSTRUMENT='Z-TESTCI-01'
It then ensures that the record was properly updated and resets the description to the old value.
|
|
|