You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2005/10/02 15:38:47 UTC
[jira] Created: (JDO-155) Add tests for InstanceLifeCycleEvents
Add tests for InstanceLifeCycleEvents
-------------------------------------
Key: JDO-155
URL: http://issues.apache.org/jira/browse/JDO-155
Project: JDO
Type: Test
Components: tck20
Reporter: Craig Russell
Assigned to: Craig Russell
A12.15-1 through A12.15-14 can all use the same test class, using different test methods.
A private class that implements the life cycle listener interface is registered with the persistence manager and keeps track of the life cycle event callbacks and the instance parameters of the callbacks.
The test method registers the life cycle event listener, makes persistence manager calls and checks that the life cycle event listener was called. Finally, the listener is unregistered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (JDO-155) Add tests for InstanceLifeCycleEvents
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-155?page=all ]
Craig Russell resolved JDO-155:
-------------------------------
Resolution: Fixed
325833 adds test cases, .jdo files, .orm files, and schema files.
325837 adds tests to alltests.conf
> Add tests for InstanceLifeCycleEvents
> -------------------------------------
>
> Key: JDO-155
> URL: http://issues.apache.org/jira/browse/JDO-155
> Project: JDO
> Type: Test
> Components: tck20
> Reporter: Craig Russell
> Assignee: Craig Russell
> Attachments: testlistener.patch
>
> A12.15-1 through A12.15-14 can all use the same test class, using different test methods.
> A private class that implements the life cycle listener interface is registered with the persistence manager and keeps track of the life cycle event callbacks and the instance parameters of the callbacks.
> The test method registers the life cycle event listener, makes persistence manager calls and checks that the life cycle event listener was called. Finally, the listener is unregistered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (JDO-155) Add tests for InstanceLifeCycleEvents
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-155?page=comments#action_12332051 ]
Craig Russell commented on JDO-155:
-----------------------------------
As part of this set of test cases, we need to integrate three pieces of test code, all of which are intimately connected and not used elsewhere:
1. The test case known to JUnit
2. The listener that is registered with the persistence manager
3. The persistence capable (and detachable) class
I propose to combine all three parts of code into the test case itself. This means that the listener and persistence capable classes are static inner classes of the test case. This works well for these tests, because there is only one .java file that contains all of the functionality needed by the test case.
Of course, each persistence capable class needs to be mapped to the database, and I propose to create a table, an entry in each of the the two .jdo files, and an entry in each of the two .orm files for each of these. It would be slightly more convenient to have a common abstract base persistence capable class that is extended by each purpose-built persistence capable class, but as we are not testing inheritance here I propose to use a class per usage with no inheritance.
> Add tests for InstanceLifeCycleEvents
> -------------------------------------
>
> Key: JDO-155
> URL: http://issues.apache.org/jira/browse/JDO-155
> Project: JDO
> Type: Test
> Components: tck20
> Reporter: Craig Russell
> Assignee: Craig Russell
> Attachments: testlistener.patch
>
> A12.15-1 through A12.15-14 can all use the same test class, using different test methods.
> A private class that implements the life cycle listener interface is registered with the persistence manager and keeps track of the life cycle event callbacks and the instance parameters of the callbacks.
> The test method registers the life cycle event listener, makes persistence manager calls and checks that the life cycle event listener was called. Finally, the listener is unregistered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (JDO-155) Add tests for InstanceLifeCycleEvents
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-155?page=all ]
Craig Russell updated JDO-155:
------------------------------
Attachment: testlistener.patch
Here are the first few tests plus the test framework. The callbacks for clear, create, and delete are implemented.
> Add tests for InstanceLifeCycleEvents
> -------------------------------------
>
> Key: JDO-155
> URL: http://issues.apache.org/jira/browse/JDO-155
> Project: JDO
> Type: Test
> Components: tck20
> Reporter: Craig Russell
> Assignee: Craig Russell
> Attachments: testlistener.patch
>
> A12.15-1 through A12.15-14 can all use the same test class, using different test methods.
> A private class that implements the life cycle listener interface is registered with the persistence manager and keeps track of the life cycle event callbacks and the instance parameters of the callbacks.
> The test method registers the life cycle event listener, makes persistence manager calls and checks that the life cycle event listener was called. Finally, the listener is unregistered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira