Skip to content
Permalink
Browse files

Improved: Turn ‘MiscTests’ into a unit test class

(OFBIZ-11067)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859982 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed May 25, 2019
1 parent 6580e07 commit d0a1dde34e68b4f7ecc0d38729b67066c8a62742
@@ -1,4 +1,4 @@
/*******************************************************************************
/*
* 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
@@ -15,8 +15,12 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
package org.apache.ofbiz.base.conversion.test;
*/
package org.apache.ofbiz.base.conversion;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

import java.math.BigDecimal;
import java.net.URL;
@@ -28,21 +32,11 @@
import org.apache.ofbiz.base.conversion.Converter;
import org.apache.ofbiz.base.conversion.ConverterLoader;
import org.apache.ofbiz.base.conversion.Converters;
import org.apache.ofbiz.base.lang.SourceMonitored;
import org.apache.ofbiz.base.test.GenericTestCaseBase;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.junit.Test;

@SourceMonitored
public class MiscTests extends GenericTestCaseBase {

public MiscTests(String name) {
super(name);
}

public void testStaticHelperClass() throws Exception {
assertStaticHelperClass(Converters.class);
}
public class MiscTests {

public static class ConverterLoaderImpl implements ConverterLoader {
@Override
@@ -51,6 +45,7 @@ public void loadConverters() {
}
}

@Test
public void testLoadContainedConvertersIgnoresException() {
Converters.loadContainedConverters(MiscTests.class);
}
@@ -70,6 +65,7 @@ public void testLoadContainedConvertersIgnoresException() {
assertEquals("pass thru target class", targetClass, converter.getTargetClass());
}

@Test
public void testPassthru() throws Exception {
String string = "ofbiz";
BigDecimal bigDecimal = new BigDecimal("1.234");
@@ -33,7 +33,6 @@
<junit-test-suite class-name="org.apache.ofbiz.base.util.collections.test.FlexibleMapAccessorTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.util.test.TimeDurationTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.util.cache.test.UtilCacheTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.conversion.test.MiscTests"/>
<junit-test-suite class-name="org.apache.ofbiz.base.conversion.test.TestBooleanConverters"/>
<junit-test-suite class-name="org.apache.ofbiz.base.conversion.test.TestJSONConverters"/>
<!--junit-test-suite class-name="org.apache.ofbiz.base.util.test.UtilIOTests"/-->

0 comments on commit d0a1dde

Please sign in to comment.
You can’t perform that action at this time.