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 TestBaseConfiguration.java
Date Thu, 03 Jun 2004 14:04:52 GMT
ebourg      2004/06/03 07:04:52

  Modified:    configuration/src/test/org/apache/commons/configuration
                        TestBaseConfiguration.java
  Log:
  Added a test for the AbstractConfiguration.processString() method
  
  Revision  Changes    Path
  1.10      +15 -2     jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestBaseConfiguration.java
  
  Index: TestBaseConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestBaseConfiguration.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestBaseConfiguration.java	13 May 2004 12:19:16 -0000	1.9
  +++ TestBaseConfiguration.java	3 Jun 2004 14:04:52 -0000	1.10
  @@ -481,6 +481,19 @@
   		fail("IllegalStateException should have been thrown for looped property references");
   	}
   
  -    
  +    public void testProcessString()
  +    {
  +        String s1 = "abc,xyz";
  +        List tokens = config.processString(s1);
  +        assertEquals("number of tokens in '" + s1 + "'", 2, tokens.size());
  +        assertEquals("1st token for '" + s1 + "'", "abc", tokens.get(0));
  +        assertEquals("2nd token for '" + s1 + "'", "xyz", tokens.get(1));
  +
  +        String s2 = "abc\\,xyz";
  +        tokens = config.processString(s2);
  +        assertEquals("number of tokens in '" + s2 + "'", 1, tokens.size());
  +        assertEquals("1st token for '" + s2 + "'", "abc,xyz", tokens.get(0));
  +    }
  +
   }
   
  
  
  

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