You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2011/12/27 22:23:23 UTC
svn commit: r1225021 -
/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestThreesomeConfiguration.java
Author: oheger
Date: Tue Dec 27 21:23:22 2011
New Revision: 1225021
URL: http://svn.apache.org/viewvc?rev=1225021&view=rev
Log:
Converted tests to JUnit 4, fixed warnings.
Modified:
commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestThreesomeConfiguration.java
Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestThreesomeConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestThreesomeConfiguration.java?rev=1225021&r1=1225020&r2=1225021&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestThreesomeConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestThreesomeConfiguration.java Tue Dec 27 21:23:22 2011
@@ -17,9 +17,12 @@ package org.apache.commons.configuration
* limitations under the License.
*/
+import static org.junit.Assert.assertEquals;
+
import java.util.List;
-import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
/**
* A base class for testing {@link
@@ -28,43 +31,37 @@ import junit.framework.TestCase;
*
* @version $Id$
*/
-public class TestThreesomeConfiguration extends TestCase
+public class TestThreesomeConfiguration
{
- protected Configuration conf = null;
+ protected Configuration conf;
- protected void setUp() throws Exception
+ @Before
+ public void setUp() throws Exception
{
conf = new PropertiesConfiguration("threesome.properties");
}
-
- /**
- * Tests <code>List</code> parsing.
- */
+
+ @Test
public void testList1() throws Exception
{
- List packages = conf.getList("test.threesome.one");
+ List<Object> packages = conf.getList("test.threesome.one");
// we should get 3 packages here
assertEquals(3, packages.size());
}
- /**
- * Tests <code>List</code> parsing.
- */
+ @Test
public void testList2() throws Exception
{
- List packages = conf.getList("test.threesome.two");
+ List<Object> packages = conf.getList("test.threesome.two");
// we should get 3 packages here
assertEquals(3, packages.size());
}
- /**
- * Tests <code>List</code> parsing.
- */
+ @Test
public void testList3() throws Exception
{
- List packages = conf.getList("test.threesome.three");
+ List<Object> packages = conf.getList("test.threesome.three");
// we should get 3 packages here
assertEquals(3, packages.size());
}
-
}