[ 
https://issues.apache.org/jira/browse/JDO-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834516#action_12834516
 ] 

Michael Bouschen commented on JDO-557:
--------------------------------------

I think we need to add a mock PMF implementation (similar to the MockEnhancer 
class) and use the mock PMF implementation for the api2 test case..

The class implements the PMF interface and should go into the directory 
api2/test/java/javax/jdo. It provides a static method 
getPersistenceManagerFactory (Map overrides, Map props). The class also needs 
to implement the setter and getter methods for the PMF properties. All other 
methods - especially the getPersistenceManager methods - should throw an 
exception. The api2 test case should then call the JDOHelper methods to create 
a PMF using the Mock PMF as the configured implementation class.

> Create tests in api2 & api2-legacy for JDO implementation's static method 
> getPersistenceManagerFactory(Map,Map)
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JDO-557
>                 URL: https://issues.apache.org/jira/browse/JDO-557
>             Project: JDO
>          Issue Type: Task
>          Components: api2, api2-legacy
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Matthew T. Adams
>            Assignee: Michelle Caisse
>             Fix For: JDO 2 maintenance release 3
>
>
> The code paths that lead to calling the JDO implementation's 
> PersistenceManagerFactory class's static method 
> getPersistenceManagerFactory(Map,Map) need to be tested.  In order to avoid a 
> dependency on a real implementation, a stub PMF implementation class should 
> be used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to