cvs commit: spice/sandbox/metaclass/src/test/org/realityforge/metaclass/tools/qdox NonNamespaceAttributeRemovingInterceptorTestCase.java

Peter Donald <[email protected]>
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
donaldp     03/10/31 17:07:27

  Modified:    sandbox/metaclass/src/test/org/realityforge/metaclass/tools/qdox
                        NonNamespaceAttributeRemovingInterceptorTestCase.java
  Log:
  Cover all paths through code
  
  Revision  Changes    Path
  1.2       +31 -1     spice/sandbox/metaclass/src/test/org/realityforge/metaclass/tools/qdox/NonNamespaceAttributeRemovingInterceptorTestCase.java
  
  Index: NonNamespaceAttributeRemovingInterceptorTestCase.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/metaclass/src/test/org/realityforge/metaclass/tools/qdox/NonNamespaceAttributeRemovingInterceptorTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NonNamespaceAttributeRemovingInterceptorTestCase.java	29 Oct 2003 08:27:02 -0000	1.1
  +++ NonNamespaceAttributeRemovingInterceptorTestCase.java	1 Nov 2003 01:07:27 -0000	1.2
  @@ -13,7 +13,7 @@
   /**
    *
    * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2003/10/29 08:27:02 $
  + * @version $Revision: 1.2 $ $Date: 2003/11/01 01:07:27 $
    */
   public class NonNamespaceAttributeRemovingInterceptorTestCase
       extends TestCase
  @@ -56,5 +56,35 @@
           final Attribute attribute = new Attribute( "baz." );
           final Attribute result = interceptor.processAttribute( attribute );
           assertEquals( "attribute", null, result );
  +    }
  +
  +    public void testProcessClassAttribute()
  +        throws Exception
  +    {
  +        final NonNamespaceAttributeRemovingInterceptor interceptor =
  +            new NonNamespaceAttributeRemovingInterceptor();
  +        final Attribute attribute = new Attribute( "foo.baz" );
  +        final Attribute result = interceptor.processClassAttribute( null, attribute );
  +        assertEquals( "attribute", attribute, result );
  +    }
  +
  +    public void testProcessMethodAttribute()
  +        throws Exception
  +    {
  +        final NonNamespaceAttributeRemovingInterceptor interceptor =
  +            new NonNamespaceAttributeRemovingInterceptor();
  +        final Attribute attribute = new Attribute( "foo.baz" );
  +        final Attribute result = interceptor.processMethodAttribute( null, attribute );
  +        assertEquals( "attribute", attribute, result );
  +    }
  +
  +    public void testProcessFieldAttribute()
  +        throws Exception
  +    {
  +        final NonNamespaceAttributeRemovingInterceptor interceptor =
  +            new NonNamespaceAttributeRemovingInterceptor();
  +        final Attribute attribute = new Attribute( "foo.baz" );
  +        final Attribute result = interceptor.processFieldAttribute( null, attribute );
  +        assertEquals( "attribute", attribute, result );
       }
   }
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.