@@ -0,0 +1,1644 @@
+/*%0A * Copyright 2001-2004 The Apache Software Foundation.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22)%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.apache.commons.configuration;%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A * Test case for the tokenizer used to slice properties into lists.%0A *%0A * @author Emmanuel Bourg%0A * @version $Revision: 1.1 $, $Date: 2004/06/10 09:38:00 $%0A */%0Apublic class TestPropertiesTokenizer extends TestCase %7B%0A%0A    public void testNextToken() %7B%0A        String s1 = %22abc,xyz%22;%0A        AbstractConfiguration.PropertiesTokenizer tokenizer = new AbstractConfiguration.PropertiesTokenizer(s1);%0A        assertEquals(%221st token for '%22 + s1 + %22'%22, %22abc%22, tokenizer.nextToken());%0A        assertEquals(%222nd token for '%22 + s1 + %22'%22, %22xyz%22, tokenizer.nextToken());%0A        assertFalse(%22more than 2 tokens found for '%22 + s1 + %22'%22, tokenizer.hasMoreTokens());%0A%0A        String s2 = %22abc%5C%5C,xyz%22;%0A        tokenizer = new AbstractConfiguration.PropertiesTokenizer(s2);%0A        assertEquals(%221st token for '%22 + s2 + %22'%22, %22abc,xyz%22, tokenizer.nextToken());%0A        assertFalse(%22more than 1 token found for '%22 + s2 + %22'%22, tokenizer.hasMoreTokens());%0A    %7D%0A%7D%0A

Test case for the PropertiesTokenizer inner class