You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2009/01/06 20:16:44 UTC

Testing with and without optional components

How do we construct unit tests that test that the code works both with
and without an optional dependency?

Re: Testing with and without optional components

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 06 January 2009 2:16:44 pm Benson Margulies wrote:
> How do we construct unit tests that test that the code works both with
> and without an optional dependency?

Oi...   No idea.  :-(

Only think I can think of is to provide some sort of flag (sys property or 
something) in the code that detects the dependency and specifically tell it 
not to do the detect.

A context classloader that blocks the dependency MIGHT work.  Not really sure 
though.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog