Re: jcontainer-interest digest, Vol 1 #191 - 5 msgs

peter-4lf8KW9E9MLMqX/[email protected] Tue, 13 Jan 2004 13:04:37 +1100
Newsgroups gmane.comp.java.jcontainer.interest
Message-ID <000a01c3d979$cd868040$21e7809d@fisg2>
> jcontainer-interest wrote:
> > As the above is a PITA to setup and configure it may be best to create a
> > static utility class to help do all this in fewer steps. You may have
> > something like a
> >
> > class VirtualMockFactory
> > {
> >   static VirtualMockRuntime createRuntime() {...} //May read default
config
> > file from Classpath
> >   static VirtualMockRuntime createRuntime( InputSource in ) {...} //For
ones
> > that use non-standard config file
> > }
>
> Would it also be acceptable to have a third overloaded method which
> takes a VirtualMockConfig as a parameter?  This would allow users to
> pass in a configuration that they have programatically created, if they
> don't want to deal with XML files.  Is this a standard/accepted approach?

I would consider it a good approach ;)