[jira] Commented: (JDO-453) Create a test for illegal arguments for
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > [jira] Commented: (JDO-453) Create a test for illegal arguments for




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Commented: (JDO-453) Create a test for illegal arguments for  
Michelle Caisse (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-17-07 12:11 AM


[ https://issues.apache.org/jira/brow...action_12473796 ]

Michelle Caisse commented on JDO-453:
-------------------------------------

From the spec (assertion numbers need to be added):

Object newInstance(Class persistenceCapable);

A12.6.6-1 [The parameter must be one of the following:
-  an abstract class that is declared in the metadata as persistence-capable
, in which all abstract methods are declared as persistent properties, or
-  an interface that is declared in the metadata as persistence-capable, in 
which all methods are declared as persistent properties, or
-  a concrete class that is declared in the metadata as persistence-capable.
 In this case, the concrete class must declare a public no-args constructor.

If the parameter does not satisfy the above requirements, JDOUserException i
s thrown.]
...
A12.6.6-2 [In order for the newInstance method to be used, the parameter
 interface must be completely mapped. For relational implementations, the in
terface must be mapped to a table and all persistent properties must be mapp
ed to columns. Additionally, in
terfaces that are the targets of all relationships from persistent propertie
s must also be mapped. Otherwise, JDOUserException is thrown by the newInsta
nce method.]

> Create a test for illegal arguments for PersistenceManager.newInstance
> ----------------------------------------------------------------------
>
>                 Key: JDO-453
>                 URL: https://issues.apache.org/jira/browse/JDO-453
>             Project: JDO
>          Issue Type: Test
>          Components: tck2, tck2-legacy
>    Affects Versions: JDO 2 final
>            Reporter: Craig Russell
>         Assigned To: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>
> New test cases are needed for illegal arguments of newInstance.
> One strategy is to define classes in a new package along with metadata, bu
t no mapping (since these are error classes). A new test should try to insta
ntiate the classes using the newInstance method and verify that JDOUserExcep
tion is thrown.
> Classes to test include:
> Abstract class with abstract method not declared as a property (missing me
tadata for the method)
> Interface with method not declared as a property (missing metadata for the
 method)
> Concrete class with missing public no-args constructor

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







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:13 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register