svn commit: r1860020 - in /ofbiz/ofbiz-framework/trunk/framework/base: src/main/java/org/apache/ofbiz/base/util/test/UtilMiscTests.java src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java testdef/basetests.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1860020 - in /ofbiz/ofbiz-framework/trunk/framework/base: src/main/java/org/apache/ofbiz/base/util/test/UtilMiscTests.java src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java testdef/basetests.xml

mthl
Author: mthl
Date: Sat May 25 21:27:30 2019
New Revision: 1860020

URL: http://svn.apache.org/viewvc?rev=1860020&view=rev
Log:
Improved: Turn ‘UtilMiscTests’ into a unit test class
(OFBIZ-11067)

Added:
    ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java   (with props)
Removed:
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/UtilMiscTests.java
Modified:
    ofbiz/ofbiz-framework/trunk/framework/base/testdef/basetests.xml

Added: ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java?rev=1860020&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java (added)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java Sat May 25 21:27:30 2019
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ofbiz.base.util;
+
+import static org.junit.Assert.fail;
+
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.ofbiz.base.util.UtilMisc;
+import org.junit.Test;
+
+public class UtilMiscTests {
+
+    @Test
+    public void testLocales() throws Exception {
+        List<Locale> availableLocales = UtilMisc.availableLocales();
+        for (Locale availableLocale : availableLocales) {
+            if (availableLocale.getDisplayName().isEmpty()) {
+                fail("Locale.getDisplayName() is empty");
+            }
+        }
+    }
+}

Propchange: ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilMiscTests.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/ofbiz-framework/trunk/framework/base/testdef/basetests.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/testdef/basetests.xml?rev=1860020&r1=1860019&r2=1860020&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/testdef/basetests.xml (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/testdef/basetests.xml Sat May 25 21:27:30 2019
@@ -23,7 +23,6 @@
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
     <test-group case-name="basetests">
         <junit-test-suite class-name="org.apache.ofbiz.base.util.test.AssertTests"/>
-        <junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilMiscTests"/>
         <junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilObjectTests"/>
         <junit-test-suite class-name="org.apache.ofbiz.base.util.string.test.FlexibleStringExpanderTests"/>
         <junit-test-suite class-name="org.apache.ofbiz.base.util.collections.test.FlexibleMapAccessorTests"/>