commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java
Date Thu, 17 Jun 2004 14:39:54 GMT
ebourg      2004/06/17 07:39:54

  Modified:    configuration/conf test.properties
               configuration/src/test/org/apache/commons/configuration
                        TestPropertiesConfiguration.java
  Log:
  Added a test for list properties specified as a comma separated values and with multiple
keys
  
  Revision  Changes    Path
  1.6       +3 -0      jakarta-commons/configuration/conf/test.properties
  
  Index: test.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/conf/test.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- test.properties	15 Jun 2004 10:12:29 -0000	1.5
  +++ test.properties	17 Jun 2004 14:39:54 -0000	1.6
  @@ -16,6 +16,9 @@
   
   test.empty =
   
  +test.mixed.array = a
  +test.mixed.array = b, c, d
  +
   #
   # Test a property that uses a previous property
   #
  
  
  
  1.8       +12 -1     jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java
  
  Index: TestPropertiesConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestPropertiesConfiguration.java	15 Jun 2004 10:12:29 -0000	1.7
  +++ TestPropertiesConfiguration.java	17 Jun 2004 14:39:54 -0000	1.8
  @@ -120,4 +120,15 @@
       {
           assertEquals("test\\,test", PropertiesConfiguration.unescapeJava("test\\,test"));
       }
  +
  +    public void testMixedArray()
  +    {
  +        String[] array = conf.getStringArray("test.mixed.array");
  +
  +        assertEquals("array length", 4, array.length);
  +        assertEquals("1st element", "a", array[0]);
  +        assertEquals("1st element", "b", array[1]);
  +        assertEquals("1st element", "c", array[2]);
  +        assertEquals("1st element", "d", array[3]);
  +    }
   }
  
  
  

---------------------------------------------------------------------
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