Re: DNA TCK?

Leo Simons <[email protected]> Wed, 21 Jan 2004 17:26:50 +0100
Newsgroups gmane.comp.java.jcontainer.interest
Message-ID <[email protected]>
peter-4lf8KW9E9MLMqX/[email protected] wrote:
> From: "Leo Simons" <[email protected]>
> 
>>I'm even more ambitious: I want to use this stuff to test (most
>>importantly, compliance with) potentially all IoC containers in existence
> 
> yikes! May be a bit hard with all the different styles. You would just end
> up writing a different layer for each different framework.

yup. The trick I'm looking at is that many of those different styles 
come down to "syntax sugar". If I have a

   protected void setXXX( blah )

I can call that from the subclass, using a constructor, service(), or 
just make it public, but it comes down to the same thing :D

> I guess the core
> of it would just be recording and playback of invocations.

yep.

> You may want to check out a few of the mock toolkits as they have that half
> done. Though I am not aware of any atm that do this for non-interfaces.

I took a look and played a little with just about all of them. I found 
one which does compile time bytecode modification reasonably well; it 
seems like that's the best bet (none of my basic objections apply), 
unfortunately none of the project I see existing in a year from now 
support it atm. What's more, that doesn't mesh well with radical 
IDE-supported refactoring (something I forgot how to do without 8-)). I 
don't want to end up doing my own mock implementation; there's too many 
already.

>>* Using bytecode modification requires control of the classloader (which
>>the TCK ideally should not require, as many containers like having that
>>control themselves)
> 
> Unfortunately I think thats the only way to write a "generic" toolkit. Not
> sure though.
> 
>>If not, things can still proceed but it's a lot of manual labor :/
> 
> yah - thats how most of the jcp TCKs are organized ;(

yep. It looks like its Just Not Possible to do the things I want the way 
I want without writing most of the tools and features I want myself. 
Several people have told me now :D. I'll just have to do the typing.

-- 
cheers,

- Leo Simons

-----------------------------------------------------------------------
Weblog              -- http://leosimons.com/
IoC Component Glue  -- http://jicarilla.org/
Articles & Opinions -- http://articles.leosimons.com/
-----------------------------------------------------------------------
"We started off trying to set up a small anarchist community, but
  people wouldn't obey the rules."
                                                         -- Alan Bennett