1   package org.apache.commons.configuration;
2   
3   /*
4    * Copyright 2001-2004 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License")
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  import java.util.List;
20  
21  import junit.framework.TestCase;
22  
23  /***
24   * A base class for testing {@link
25   * org.apache.commons.configuration.BasePropertiesConfiguration}
26   * extensions.
27   *
28   * @version $Id: TestThreesomeConfiguration.java 155408 2005-02-26 12:56:39Z dirkv $
29   */
30  public class TestThreesomeConfiguration extends TestCase
31  {
32      protected Configuration conf = null;
33  
34      protected void setUp() throws Exception
35      {
36          conf = new PropertiesConfiguration("threesome.properties");
37      }
38      
39      /***
40       * Tests <code>List</code> parsing.
41       */
42      public void testList1() throws Exception
43      {
44          List packages = conf.getList("test.threesome.one");
45          // we should get 3 packages here
46          assertEquals(3, packages.size());
47      }
48  
49      /***
50       * Tests <code>List</code> parsing.
51       */
52      public void testList2() throws Exception
53      {
54          List packages = conf.getList("test.threesome.two");
55          // we should get 3 packages here
56          assertEquals(3, packages.size());
57      }
58  
59      /***
60       * Tests <code>List</code> parsing.
61       */
62      public void testList3() throws Exception
63      {
64          List packages = conf.getList("test.threesome.three");
65          // we should get 3 packages here
66          assertEquals(3, packages.size());
67      }
68  
69  }