commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosu...@apache.org
Subject cvs commit: jakarta-commons-sandbox/attributes/xdocs index.xml
Date Wed, 05 May 2004 12:24:46 GMT
leosutic    2004/05/05 05:24:46

  Modified:    attributes/unittest/src/test/org/apache/commons/attributes/test
                        AttributesTestCase.java RuntimeSample.java
                        Sample.java SuperSample.java
               attributes/xdocs index.xml
  Log:
  Bringing stuff back into sync.
  
  Revision  Changes    Path
  1.12      +14 -0     jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/AttributesTestCase.java
  
  Index: AttributesTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/AttributesTestCase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AttributesTestCase.java	21 Mar 2004 00:02:37 -0000	1.11
  +++ AttributesTestCase.java	5 May 2004 12:24:45 -0000	1.12
  @@ -121,6 +121,20 @@
           assertTrue (Attributes.hasAttribute (m, new Dependency ( SampleService.class, "sample-if-1"
) ));
           assertTrue (Attributes.hasAttribute (m, new Dependency ( SampleService.class, "sample-if-2"
) ));
       }
  +    
  +    public void testPrivateMethodNonInheritance () throws Exception {
  +        Method m = Sample.class.getDeclaredMethod ("privateMethod", new Class[]{});
  +        assertEquals (1, Attributes.getAttributes (m).size ());
  +        assertEquals (1, Attributes.getAttributes (m, Dependency.class).size ());
  +        assertTrue (Attributes.hasAttributeType (m, Dependency.class));
  +        assertTrue (Attributes.hasAttribute (m, new Dependency ( SampleService.class, "sample-privateMethod"
) ));
  +        
  +        m = SuperSample.class.getDeclaredMethod ("privateMethod", new Class[]{});
  +        assertEquals (1, Attributes.getAttributes (m).size ());
  +        assertEquals (1, Attributes.getAttributes (m, Dependency.class).size ());
  +        assertTrue (Attributes.hasAttributeType (m, Dependency.class));
  +        assertTrue (Attributes.hasAttribute (m, new Dependency ( SampleService.class, "super-privateMethod"
) ));
  +    }
   
       public void testParameterAndReturnAttributes () throws Exception {
           Method m = Sample.class.getMethod ("methodWithAttributes", new Class[]{ Integer.TYPE,
Integer.TYPE });
  
  
  
  1.6       +5 -0      jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/RuntimeSample.java
  
  Index: RuntimeSample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/RuntimeSample.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RuntimeSample.java	19 Feb 2004 14:49:15 -0000	1.5
  +++ RuntimeSample.java	5 May 2004 12:24:46 -0000	1.6
  @@ -40,6 +40,8 @@
               ba.setName ("Smith, John \"Agent\"");
               rar.addMethodAttribute ("methodWithNamedParameters", new Class[]{}, ba);
               
  +            rar.addMethodAttribute ("privateMethod", new Class[]{}, new Dependency ( SampleService.class,
"sample-privateMethod" ));
  +            
               Attributes.setAttributes (rar);
           } catch (Exception e) {
               throw new Error ("Unable to set attribute information: " + e.toString ());
  @@ -67,6 +69,9 @@
       }
       
       public void methodWithNoAttributes () {
  +    }
  +    
  +    private void privateMethod () {
       }
       
       public static class InnerSample {
  
  
  
  1.7       +7 -0      jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/Sample.java
  
  Index: Sample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/Sample.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Sample.java	19 Feb 2004 14:49:15 -0000	1.6
  +++ Sample.java	5 May 2004 12:24:46 -0000	1.7
  @@ -65,4 +65,11 @@
        */
       public static class InnerSample {
       }
  +    
  +    /**
  +     * @@Dependency ( SampleService.class, "sample-privateMethod" )
  +     */
  +    private void privateMethod () {
  +        
  +    }
   }
  
  
  
  1.6       +7 -0      jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SuperSample.java
  
  Index: SuperSample.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SuperSample.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SuperSample.java	19 Feb 2004 14:49:15 -0000	1.5
  +++ SuperSample.java	5 May 2004 12:24:46 -0000	1.6
  @@ -54,4 +54,11 @@
           
       }
       
  +    /**
  +     * @@Dependency ( SampleService.class, "super-privateMethod" )
  +     */
  +    private void privateMethod () {
  +        
  +    }
  +    
   }
  
  
  
  1.7       +5 -1      jakarta-commons-sandbox/attributes/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/xdocs/index.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- index.xml	3 Mar 2004 21:20:04 -0000	1.6
  +++ index.xml	5 May 2004 12:24:46 -0000	1.7
  @@ -206,6 +206,10 @@
                       <td>Yes</td>
                   </tr>
                   <tr>
  +                    <td>Javadoc Taglet</td>
  +                    <td>Yes</td>
  +                </tr>
  +                <tr>
                       <td>Object attributes don't have to be serializable</td>
                       <td>Yes</td>
                   </tr>
  @@ -224,7 +228,7 @@
                   <tr>
                       <td>Runtime code size</td>
                       <td>21kB</td>
  -                </tr>
  +                </tr>                
                   <tr>
                       <td>Unit test coverage</td>
                       <td>Excellent</td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message