I need to log some messages while testing using AbstractMerlinTestCase.

I see from below thread, that getLogger is available with 3.1-dev 
version of merlin-unit  library.

I assume it should be in 3.2.8 as well.  But I get NoSuchMethod error.


 [junit] java.lang.NoSuchMethodError:
com.mycomp.myapp.test.StandardTestCase.getLogger()Lorg/apache/avalon/framework/logger/Logger;


Any ideas



On Tue, 2003-10-14 at 08:13, Stephen McConnell wrote:
> 
> An abstract Merlin Test Case is now available.  The abstract test case
> provides support for unit test resolution of components.  The abstract
> test case includes an embedded merlin kernel that creates and deploys
> a container based on default or supplied arguments.  Components
> established by Merlin are accessible via absolute or relative names
> from a unit test class.
> 
> For example (adapted from turorials/hello):
> 
>   public class StandardTestCase extends AbstractMerlinTestCase
>   {
>       public StandardTestCase( String name )
>       {
>           super( name );
>       }
> 
>       public void testServiceResolution() throws Exception
>       {
>           Object hello = resolve( "hello" ); // <-----------
>           assertTrue( hello != null );
>           getLogger().info( "Hello established." ); // <--------
>       }
>   }
> 
> Two noteable methods in the above include the "resolve" and "getLogger"
> methods.  The resolve method returns a component by relative or absolute
> name.  Relative names are resolved relative to a test container included
> under ${basedir}/target/classes (or a supplied alternative path).  The
> getLogger() operation is simply a convinience logger.
> 
> The unit test package is dependent on the latest build of Merlin.  If you
> running against CVS, then a cvs update and build should bring everything
> up-to-date using:
> 
>   $ cd merlin
>   $ maven merlin:update
> 
> When using the abstract testcase you need to include the following 
> dependency
> statement in your project.xml file:
> 
>     <dependency>
>       <groupId>merlin</groupId>
>       <artifactId>merlin-unit</artifactId>
>       <version>3.1-dev</version>
>     </dependency>
> 
> It is strongly recommended that you remove any avalon-* and merlin-*
> directories from you maven repository.  In addition, if your updating
> Merlin to the latest binary release then please replace both the
> MERLIN_HOME/bin directory and the MERLIN_HOME/system directory.
> 
> Merlin 20031014 is now availble for download at the following url:
> 
>   http://dpml.net/merlin/distributions/latest/
> 
> More detailed documentation about the usage of the merlin abstract
> test case class should be available shortly (anytime in
> the next six hours) at the following url:
> 
>   http://avalon.apache.org/merlin/starting/advanced/unit/index.html
> 
> Cheers, Steve.
> 
> -- 
> 
> Stephen J. McConnell
> mailto:[EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to