avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon/src/test/org/apache/avalon/framework/parameters/test ParameterTestCase.java
Date Mon, 21 Apr 2003 13:44:44 GMT
bloritsch    2003/04/21 06:44:44

  Modified:    src/test/org/apache/avalon/framework/parameters/test
                        ParameterTestCase.java
  Log:
  small formatting changes to parameters
  
  Revision  Changes    Path
  1.10      +13 -15    avalon/src/test/org/apache/avalon/framework/parameters/test/ParameterTestCase.java
  
  Index: ParameterTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon/src/test/org/apache/avalon/framework/parameters/test/ParameterTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ParameterTestCase.java	22 Mar 2003 10:59:17 -0000	1.9
  +++ ParameterTestCase.java	21 Apr 2003 13:44:44 -0000	1.10
  @@ -63,8 +63,6 @@
   
   /**
    * TestCase for Parameter.
  - * FIXME: Write messages for each assertion.
  - * Writing message in English is very difficult for me :-(.
    *
    * @author <a href="mailto:colus@isoft.co.kr">Eung-ju Park</a>
    */
  @@ -82,9 +80,9 @@
       {
           final Parameters parameters = new Parameters();
           parameters.setParameter( "key1", "value1" );
  -        assertEquals( 1, parameters.getNames().length );
  +        assertEquals("Should only have one parameter", 1, parameters.getNames().length
);
           parameters.setParameter( "key1", null );
  -        assertTrue( ! parameters.isParameter( "key1" ) );
  +        assertTrue( "key1 should no longer be a parameter", ! parameters.isParameter( "key1"
) );
           assertEquals( 0, parameters.getNames().length );
       }
   
  @@ -92,8 +90,8 @@
       {
           final Parameters parameters = new Parameters();
           parameters.setParameter( "key1", "value1" );
  -        assertTrue( parameters.isParameter( "key1" ) );
  -        assertTrue( ! parameters.isParameter( "key2" ) );
  +        assertTrue( "key1 should be a parameter", parameters.isParameter( "key1" ) );
  +        assertTrue( "key2 should not be a parameter", ! parameters.isParameter( "key2"
) );
       }
   
       public void testGetParameter()
  @@ -103,7 +101,7 @@
   
           try
           {
  -            assertEquals( "value1", parameters.getParameter( "key1" ) );
  +            assertEquals( "key1 should equal value1", "value1", parameters.getParameter(
"key1" ) );
           }
           catch ( final ParameterException pe )
           {
  @@ -120,9 +118,9 @@
               //OK
           }
   
  -        assertEquals( "value1", parameters.getParameter( "key1", "value1-1" ) );
  +        assertEquals( "key1 should use correct value1", "value1", parameters.getParameter(
"key1", "value1-1" ) );
   
  -        assertEquals( "value2", parameters.getParameter( "key2", "value2" ) );
  +        assertEquals( "key2 should use default value2", "value2", parameters.getParameter(
"key2", "value2" ) );
       }
   
       public void testFromConfiguration()
  @@ -144,9 +142,9 @@
               final Parameters parameters =
                   Parameters.fromConfiguration( configuration );
   
  -            assertEquals( "value1", parameters.getParameter( "key1" ) );
  -            assertEquals( "value2", parameters.getParameter( "key2" ) );
  -            assertEquals( "value3", parameters.getParameter( "key3" ) );
  +            assertEquals( "key1 should be value1", "value1", parameters.getParameter( "key1"
) );
  +            assertEquals( "key2 should be value2", "value2", parameters.getParameter( "key2"
) );
  +            assertEquals( "key3 should be value3", "value3", parameters.getParameter( "key3"
) );
           }
           catch ( final ConfigurationException ce )
           {
  @@ -169,9 +167,9 @@
   
           try
           {
  -            assertEquals( "value1", parameters.getParameter( "key1" ) );
  -            assertEquals( "value2", parameters.getParameter( "key2" ) );
  -            assertEquals( "value3", parameters.getParameter( "key3" ) );
  +            assertEquals( "key1 should be value1", "value1", parameters.getParameter( "key1"
) );
  +            assertEquals( "key2 should be value2", "value2", parameters.getParameter( "key2"
) );
  +            assertEquals( "key3 should be value3", "value3", parameters.getParameter( "key3"
) );
           }
           catch ( final ParameterException pe )
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message