Hi Dave...

Here are my thoughts regarding your dreams :), As you know the new JUnit
framework supports annotated test cases, which means that you annotate the
test case class that you want the framework's test runner to identify as
test cases and run them, so my idea is to make use of this idea and create a
customized test runner that checks for @EJB annotated fields and initialize
appropriately. This customized test runner will be initialized by the
appropriate properties by which it can create an initial context to use it
to lookup the required resources according to the available annotated
fields, this customized test runner will play like a very simple container
for test cases.

On 12/28/06, David Blevins <[EMAIL PROTECTED]> wrote:

Not sure how we'd pull it off, but it would be cool to have @EJB
injection for test cases.  Instead of test cases using JNDI to lookup
beans and then test them as we do now, the idea would be that the
test case need only have an @EJB annotation on a field.

Something like that would obviously require some deep hooks or a
specialized test runner or special test case class, but anyway ... a
guy can dream.

-David




--
Thanks
- Mohammad Nour

Reply via email to