This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git


The following commit(s) were added to refs/heads/master by this push:
     new 64142d21 Port from JUnit 3 to 5
64142d21 is described below

commit 64142d2177726f23354609df5eabbd8910b18fa9
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Aug 23 10:48:43 2023 -0400

    Port from JUnit 3 to 5
---
 .../beanutils2/locale/LocaleBeanUtilsTestCase.java | 52 +++++-----------------
 1 file changed, 11 insertions(+), 41 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/beanutils2/locale/LocaleBeanUtilsTestCase.java
 
b/src/test/java/org/apache/commons/beanutils2/locale/LocaleBeanUtilsTestCase.java
index a3bd21a6..ecd075bf 100644
--- 
a/src/test/java/org/apache/commons/beanutils2/locale/LocaleBeanUtilsTestCase.java
+++ 
b/src/test/java/org/apache/commons/beanutils2/locale/LocaleBeanUtilsTestCase.java
@@ -16,83 +16,53 @@
  */
 package org.apache.commons.beanutils2.locale;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
+
 import org.apache.commons.beanutils2.TestBean;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test Case for {@link LocaleBeanUtils}.
  *
  */
-public class LocaleBeanUtilsTestCase extends TestCase {
+public class LocaleBeanUtilsTestCase {
 
     private static final Log LOG = 
LogFactory.getLog(LocaleBeanUtilsTestCase.class);
 
-    /**
-     * Creates the tests included in this test suite.
-     *
-     * @return Test Suite
-     */
-    public static Test suite() {
-        return new TestSuite(LocaleBeanUtilsTestCase.class);
-    }
-
-    /**
-     * Constructs a new instance of this test case.
-     *
-     * @param name Name of the test case
-     */
-    public LocaleBeanUtilsTestCase(final String name) {
-        super(name);
-    }
-
-    /**
-     * Sets up instance variables required by this test case.
-     */
-    @Override
-    public void setUp() {
-    }
-
-    /**
-     * Tear down instance variables required by this test case.
-     */
-    @Override
-    public void tearDown() {
-    }
-
     /**
      * Test setting a nested indexed property
      */
+    @Test
     public void testSetNestedPropertyIndexed() {
         final TestBean bean = new TestBean();
         bean.getNested().setIntIndexed(1, 51);
-        assertEquals("Initial value[1] 51", 51, 
bean.getNested().getIntIndexed(1));
+        assertEquals(51, bean.getNested().getIntIndexed(1), "Initial value[1] 
51");
         try {
             LocaleBeanUtils.setProperty(bean, "nested.intIndexed[1]", "123", 
null);
         } catch (final Throwable t) {
             LOG.error(t);
             fail("Threw " + t);
         }
-        assertEquals("Check Set Value", 123, 
bean.getNested().getIntIndexed(1));
+        assertEquals(123, bean.getNested().getIntIndexed(1), "Check Set 
Value");
     }
 
     /**
      * Test setting a nested simple property
      */
+    @Test
     public void testSetNestedPropertySimple() {
         final TestBean bean = new TestBean();
         bean.getNested().setIntProperty(5);
-        assertEquals("Initial value 5", 5, bean.getNested().getIntProperty());
+        assertEquals(5, bean.getNested().getIntProperty(), "Initial value 5");
         try {
             LocaleBeanUtils.setProperty(bean, "nested.intProperty", "123", 
null);
         } catch (final Throwable t) {
             LOG.error(t);
             fail("Threw " + t);
         }
-        assertEquals("Check Set Value", 123, 
bean.getNested().getIntProperty());
+        assertEquals(123, bean.getNested().getIntProperty(), "Check Set 
Value");
     }
 }

Reply via email to